diff options
author | Wolfgang Ulbrich <[email protected]> | 2016-01-27 18:14:37 +0100 |
---|---|---|
committer | Wolfgang Ulbrich <[email protected]> | 2016-01-27 18:14:37 +0100 |
commit | 37e590249dd9d191a2331040fb879830c9ceea8e (patch) | |
tree | 59fa7570d63841063eeb7682c201a5053f3d427b /netspeed/src/netspeed.c | |
parent | acc20eb50af01fcb6ca2a024b65913cc32a1e670 (diff) | |
download | mate-applets-37e590249dd9d191a2331040fb879830c9ceea8e.tar.bz2 mate-applets-37e590249dd9d191a2331040fb879830c9ceea8e.tar.xz |
GTK3: fix previous GtkMisc deprecations fix commit
Diffstat (limited to 'netspeed/src/netspeed.c')
-rw-r--r-- | netspeed/src/netspeed.c | 90 |
1 files changed, 44 insertions, 46 deletions
diff --git a/netspeed/src/netspeed.c b/netspeed/src/netspeed.c index 98d486d6..abf6451b 100644 --- a/netspeed/src/netspeed.c +++ b/netspeed/src/netspeed.c @@ -993,11 +993,11 @@ settings_cb(GtkAction *action, gpointer data) category_header_label = gtk_label_new(header_str); gtk_label_set_use_markup(GTK_LABEL(category_header_label), TRUE); gtk_label_set_justify(GTK_LABEL(category_header_label), GTK_JUSTIFY_LEFT); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (category_header_label, GTK_ALIGN_START); - gtk_widget_set_valign (category_header_label, GTK_ALIGN_CENTER); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (category_header_label), 0.0); + gtk_label_set_yalign (GTK_LABEL (category_header_label), 0.5); #else - gtk_misc_set_alignment(GTK_MISC (category_header_label), 0, 0.5); + gtk_misc_set_alignment(GTK_MISC (category_header_label), 0.0, 0.5); #endif gtk_box_pack_start(GTK_BOX (category_vbox), category_header_label, FALSE, FALSE, 0); g_free(header_str); @@ -1017,9 +1017,9 @@ settings_cb(GtkAction *action, gpointer data) network_device_label = gtk_label_new_with_mnemonic(_("Network _device:")); gtk_label_set_justify(GTK_LABEL(network_device_label), GTK_JUSTIFY_LEFT); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (network_device_label, GTK_ALIGN_START); - gtk_widget_set_valign (network_device_label, GTK_ALIGN_CENTER); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (network_device_label), 0.0f); + gtk_label_set_yalign (GTK_LABEL (network_device_label), 0.5f); #else gtk_misc_set_alignment(GTK_MISC(network_device_label), 0.0f, 0.5f); #endif @@ -1256,33 +1256,31 @@ showinfo_cb(GtkAction *action, gpointer data) gtk_label_set_selectable(GTK_LABEL(hwaddr_text), TRUE); gtk_label_set_selectable(GTK_LABEL(ptpip_text), TRUE); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (ip_label, GTK_ALIGN_START); - gtk_widget_set_valign (ip_label, GTK_ALIGN_CENTER); - gtk_widget_set_halign (ip_text, GTK_ALIGN_START); - gtk_widget_set_valign (ip_text, GTK_ALIGN_CENTER); - gtk_widget_set_halign (netmask_label, GTK_ALIGN_START); - gtk_widget_set_valign (netmask_label, GTK_ALIGN_CENTER); - gtk_widget_set_halign (netmask_text, GTK_ALIGN_START); - gtk_widget_set_valign (netmask_text, GTK_ALIGN_CENTER); - gtk_widget_set_halign (hwaddr_label, GTK_ALIGN_START); - gtk_widget_set_valign (hwaddr_label, GTK_ALIGN_CENTER); - gtk_widget_set_halign (hwaddr_text, GTK_ALIGN_START); - gtk_widget_set_valign (hwaddr_text, GTK_ALIGN_CENTER); - gtk_widget_set_halign (ptpip_label, GTK_ALIGN_START); - gtk_widget_set_valign (ptpip_label, GTK_ALIGN_CENTER); - gtk_widget_set_halign (ptpip_text, GTK_ALIGN_START); - gtk_widget_set_valign (ptpip_text, GTK_ALIGN_CENTER); - gtk_widget_set_halign (inbytes_label, GTK_ALIGN_START); - gtk_widget_set_valign (inbytes_label, GTK_ALIGN_CENTER); - gtk_widget_set_halign (applet->inbytes_text, GTK_ALIGN_START); - gtk_widget_set_valign (applet->inbytes_text, GTK_ALIGN_CENTER); - gtk_widget_set_halign (inbytes_label, GTK_ALIGN_START); - gtk_widget_set_valign (inbytes_label, GTK_ALIGN_CENTER); - gtk_widget_set_halign (applet->outbytes_text, GTK_ALIGN_START); - gtk_widget_set_valign (applet->outbytes_text, GTK_ALIGN_CENTER); - gtk_widget_set_halign (outbytes_label, GTK_ALIGN_START); - gtk_widget_set_valign (outbytes_label, GTK_ALIGN_CENTER); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (ip_label), 0.0f); + gtk_label_set_yalign (GTK_LABEL (ip_label), 0.5f); + gtk_label_set_xalign (GTK_LABEL (ip_text), 0.0f); + gtk_label_set_yalign (GTK_LABEL (ip_text), 0.5f); + gtk_label_set_xalign (GTK_LABEL (netmask_label), 0.0f); + gtk_label_set_yalign (GTK_LABEL (netmask_label), 0.5f); + gtk_label_set_xalign (GTK_LABEL (netmask_text), 0.0f); + gtk_label_set_yalign (GTK_LABEL (netmask_text), 0.5f); + gtk_label_set_xalign (GTK_LABEL (hwaddr_label), 0.0f); + gtk_label_set_yalign (GTK_LABEL (hwaddr_label), 0.5f); + gtk_label_set_xalign (GTK_LABEL (hwaddr_text), 0.0f); + gtk_label_set_yalign (GTK_LABEL (hwaddr_text), 0.5f); + gtk_label_set_xalign (GTK_LABEL (ptpip_label), 0.0f); + gtk_label_set_yalign (GTK_LABEL (ptpip_label), 0.5f); + gtk_label_set_xalign (GTK_LABEL (ptpip_text), 0.0f); + gtk_label_set_yalign (GTK_LABEL (ptpip_text), 0.5f); + gtk_label_set_xalign (GTK_LABEL (inbytes_label), 0.0f); + gtk_label_set_yalign (GTK_LABEL (inbytes_label), 0.5f); + gtk_label_set_xalign (GTK_LABEL (applet->inbytes_text), 0.0f); + gtk_label_set_yalign (GTK_LABEL (applet->inbytes_text), 0.5f); + gtk_label_set_xalign (GTK_LABEL (outbytes_label), 0.0f); + gtk_label_set_yalign (GTK_LABEL (outbytes_label), 0.5f); + gtk_label_set_xalign (GTK_LABEL (applet->outbytes_text), 0.0f); + gtk_label_set_yalign (GTK_LABEL (applet->outbytes_text), 0.5f); #else gtk_misc_set_alignment(GTK_MISC(ip_label), 0.0f, 0.5f); gtk_misc_set_alignment(GTK_MISC(ip_text), 0.0f, 0.5f); @@ -1320,11 +1318,11 @@ showinfo_cb(GtkAction *action, gpointer data) gtk_label_set_selectable (GTK_LABEL (ipv6_text), TRUE); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (ipv6_label, GTK_ALIGN_START); - gtk_widget_set_valign (ipv6_label, GTK_ALIGN_CENTER); - gtk_widget_set_halign (ipv6_text, GTK_ALIGN_START); - gtk_widget_set_valign (ipv6_text, GTK_ALIGN_CENTER); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (ipv6_label), 0.0f); + gtk_label_set_yalign (GTK_LABEL (ipv6_label), 0.5f); + gtk_label_set_xalign (GTK_LABEL (ipv6_text), 0.0f); + gtk_label_set_yalign (GTK_LABEL (ipv6_text), 0.5f); #else gtk_misc_set_alignment (GTK_MISC (ipv6_label), 0.0f, 0.5f); gtk_misc_set_alignment (GTK_MISC (ipv6_text), 0.0f, 0.5f); @@ -1358,13 +1356,13 @@ showinfo_cb(GtkAction *action, gpointer data) essid_label = gtk_label_new (_("ESSID:")); essid_text = gtk_label_new (applet->devinfo.essid); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (signal_label, GTK_ALIGN_START); - gtk_widget_set_valign (signal_label, GTK_ALIGN_CENTER); - gtk_widget_set_halign (essid_label, GTK_ALIGN_START); - gtk_widget_set_valign (essid_label, GTK_ALIGN_CENTER); - gtk_widget_set_halign (essid_text, GTK_ALIGN_START); - gtk_widget_set_valign (essid_text, GTK_ALIGN_CENTER); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (signal_label), 0.0f); + gtk_label_set_yalign (GTK_LABEL (signal_label), 0.5f); + gtk_label_set_xalign (GTK_LABEL (essid_label), 0.0f); + gtk_label_set_yalign (GTK_LABEL (essid_label), 0.5f);; + gtk_label_set_xalign (GTK_LABEL (essid_text), 0.0f); + gtk_label_set_yalign (GTK_LABEL (essid_text), 0.5f); #else gtk_misc_set_alignment (GTK_MISC (signal_label), 0.0f, 0.5f); gtk_misc_set_alignment (GTK_MISC (essid_label), 0.0f, 0.5f); |