xedit-statusbar: Clean up and fix some deprecation warnings

This commit is contained in:
JosephMcc 2016-01-26 12:32:39 -08:00
parent d071bf422e
commit f6c4752434
2 changed files with 181 additions and 4650 deletions

File diff suppressed because it is too large Load Diff

View File

@ -42,10 +42,6 @@
XEDIT_TYPE_STATUSBAR,\
XeditStatusbarPrivate))
#if GTK_CHECK_VERSION (3, 0, 0)
#define gtk_hbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL,Y)
#endif
struct _XeditStatusbarPrivate
{
GtkWidget *overwrite_mode_label;
@ -114,10 +110,8 @@ xedit_statusbar_init (XeditStatusbar *statusbar)
statusbar->priv = XEDIT_STATUSBAR_GET_PRIVATE (statusbar);
#if GTK_CHECK_VERSION (3, 0, 0)
gtk_widget_set_margin_top (GTK_WIDGET (statusbar), 0);
gtk_widget_set_margin_bottom (GTK_WIDGET (statusbar), 0);
#endif
statusbar->priv->overwrite_mode_label = gtk_label_new (NULL);
gtk_label_set_width_chars (GTK_LABEL (statusbar->priv->overwrite_mode_label),
@ -139,12 +133,12 @@ xedit_statusbar_init (XeditStatusbar *statusbar)
gtk_frame_set_shadow_type (GTK_FRAME (statusbar->priv->state_frame),
GTK_SHADOW_IN);
hbox = gtk_hbox_new (FALSE, 0);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_container_add (GTK_CONTAINER (statusbar->priv->state_frame), hbox);
statusbar->priv->load_image = gtk_image_new_from_stock (GTK_STOCK_OPEN, GTK_ICON_SIZE_MENU);
statusbar->priv->save_image = gtk_image_new_from_stock (GTK_STOCK_SAVE, GTK_ICON_SIZE_MENU);
statusbar->priv->print_image = gtk_image_new_from_stock (GTK_STOCK_PRINT, GTK_ICON_SIZE_MENU);
statusbar->priv->load_image = gtk_image_new_from_icon_name ("document-open-symbolic", GTK_ICON_SIZE_MENU);
statusbar->priv->save_image = gtk_image_new_from_icon_name ("document-save-symbolic", GTK_ICON_SIZE_MENU);
statusbar->priv->print_image = gtk_image_new_from_icon_name ("printer-symbolic", GTK_ICON_SIZE_MENU);
gtk_widget_show (hbox);
@ -165,11 +159,8 @@ xedit_statusbar_init (XeditStatusbar *statusbar)
statusbar->priv->error_frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (statusbar->priv->error_frame), GTK_SHADOW_IN);
#if GTK_CHECK_VERSION (3, 10, 0)
error_image = gtk_image_new_from_icon_name ("dialog-error", GTK_ICON_SIZE_MENU);
#else
error_image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_ERROR, GTK_ICON_SIZE_MENU);
#endif
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_margin_start (error_image, 4);
gtk_widget_set_margin_end (error_image, 4);