Migrate from deprecated GtkTooltips to GtkTooltip in clamd plugin.
authorAndrej Kacian <ticho@claws-mail.org>
Fri, 9 Feb 2018 20:18:29 +0000 (21:18 +0100)
committerAndrej Kacian <ticho@claws-mail.org>
Fri, 9 Feb 2018 21:09:07 +0000 (22:09 +0100)
src/plugins/clamd/clamav_plugin_gtk.c

index 565f98b..7519643 100644 (file)
@@ -234,9 +234,7 @@ static void clamav_create_widget_func(PrefsPage * _page, GtkWindow *window, gpoi
        GtkWidget *host_label;
        GtkWidget *port_label;
        GtkWidget *setting_type;
-       GtkTooltips *tooltips;
 
-       tooltips = gtk_tooltips_new();
        enable_clamav = page->enable_clamav;
 
        vbox1 = gtk_vbox_new (FALSE, VSPACING);
@@ -267,9 +265,8 @@ static void clamav_create_widget_func(PrefsPage * _page, GtkWindow *window, gpoi
        gtk_widget_show (max_size);
        gtk_box_pack_start (GTK_BOX (hbox1), max_size, FALSE, FALSE, 0);
        gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (max_size), TRUE);
-       gtk_tooltips_set_tip(tooltips, max_size,
-                            _("Message attachments larger than this will not be scanned"),
-                            NULL);
+       gtk_widget_set_tooltip_text(max_size,
+                            _("Message attachments larger than this will not be scanned"));
        SET_TOGGLE_SENSITIVITY (enable_clamav, max_size);
 
        label2 = gtk_label_new(_("MB"));
@@ -284,25 +281,22 @@ static void clamav_create_widget_func(PrefsPage * _page, GtkWindow *window, gpoi
        recv_infected = gtk_check_button_new_with_label(_("Save infected mail in"));
        gtk_widget_show (recv_infected);
        gtk_box_pack_start (GTK_BOX (hbox1), recv_infected, FALSE, FALSE, 0);
-       gtk_tooltips_set_tip(tooltips, recv_infected,
-                            _("Save mail that contains viruses"),
-                            NULL);
+       gtk_widget_set_tooltip_text(recv_infected,
+                            _("Save mail that contains viruses"));
        SET_TOGGLE_SENSITIVITY (enable_clamav, recv_infected);
 
        save_folder = gtk_entry_new ();
        gtk_widget_show (save_folder);
        gtk_box_pack_start (GTK_BOX (hbox1), save_folder, TRUE, TRUE, 0);
-       gtk_tooltips_set_tip(tooltips, save_folder,
-                            _("Folder for storing infected mail. Leave empty to use the default trash folder"),
-                            NULL);
+       gtk_widget_set_tooltip_text(save_folder,
+                            _("Folder for storing infected mail. Leave empty to use the default trash folder"));
        SET_TOGGLE_SENSITIVITY (enable_clamav, save_folder);
 
        save_folder_select = gtkut_get_browse_directory_btn(_("_Browse"));
        gtk_widget_show (save_folder_select);
        gtk_box_pack_start (GTK_BOX (hbox1), save_folder_select, FALSE, FALSE, 0);
-       gtk_tooltips_set_tip(tooltips, save_folder_select,
-                            _("Click this button to select a folder for storing infected mail"),
-                            NULL);
+       gtk_widget_set_tooltip_text(save_folder_select,
+                            _("Click this button to select a folder for storing infected mail"));
        SET_TOGGLE_SENSITIVITY (enable_clamav, save_folder_select);
 
        hbox1 = gtk_hbox_new (FALSE, 8);
@@ -313,9 +307,8 @@ static void clamav_create_widget_func(PrefsPage * _page, GtkWindow *window, gpoi
        /*gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(setting_type), TRUE);*/
        gtk_widget_show (setting_type);
        gtk_box_pack_start (GTK_BOX (hbox1), setting_type, FALSE, FALSE, 0);
-       gtk_tooltips_set_tip(tooltips, setting_type,
-                            _("Should configuration be done automatic or manual"),
-                            NULL);
+       gtk_widget_set_tooltip_text(setting_type,
+                            _("Should configuration be done automatic or manual"));
        SET_TOGGLE_SENSITIVITY (enable_clamav, setting_type);
        
        hbox_auto1 = gtk_hbox_new (FALSE, 8);
@@ -329,17 +322,15 @@ static void clamav_create_widget_func(PrefsPage * _page, GtkWindow *window, gpoi
        config_folder = gtk_entry_new ();
        gtk_widget_show (config_folder);
        gtk_box_pack_start (GTK_BOX (hbox_auto1), config_folder, TRUE, TRUE, 0);
-       gtk_tooltips_set_tip(tooltips, config_folder,
-                            _("Full path to clamd.conf. If this field is not empty then the plugin has been able to locate the file automatically"),
-                            NULL);
+       gtk_widget_set_tooltip_text(config_folder,
+                            _("Full path to clamd.conf. If this field is not empty then the plugin has been able to locate the file automatically"));
        SET_TOGGLE_SENSITIVITY (enable_clamav, config_folder);
 
        config_folder_select = gtkut_get_browse_directory_btn(_("Br_owse"));
        gtk_widget_show (config_folder_select);
        gtk_box_pack_start (GTK_BOX (hbox_auto1), config_folder_select, FALSE, FALSE, 0);
-       gtk_tooltips_set_tip(tooltips, config_folder_select,
-                            _("Click this button to select full path to clamd.conf"),
-                            NULL);
+       gtk_widget_set_tooltip_text(config_folder_select,
+                            _("Click this button to select full path to clamd.conf"));
        SET_TOGGLE_SENSITIVITY (enable_clamav, config_folder_select);
 
        hbox_auto2 = gtk_hbox_new (FALSE, 8);
@@ -358,9 +349,8 @@ static void clamav_create_widget_func(PrefsPage * _page, GtkWindow *window, gpoi
                        /*gtk_button_new_with_mnemonic(_("_Check Permission"));*/
        gtk_widget_show (permission_select);
        gtk_box_pack_start (GTK_BOX (hbox_auto2), permission_select, FALSE, FALSE, 0);
-       gtk_tooltips_set_tip(tooltips, permission_select,
-                            _("Click this button to check and adjust folder permissions"),
-                            NULL);
+       gtk_widget_set_tooltip_text(permission_select,
+                            _("Click this button to check and adjust folder permissions"));
        SET_TOGGLE_SENSITIVITY (enable_clamav, permission_select);
 
        hbox_manual1 = gtk_hbox_new (FALSE, 8);
@@ -374,9 +364,8 @@ static void clamav_create_widget_func(PrefsPage * _page, GtkWindow *window, gpoi
        config_host = gtk_entry_new ();
        gtk_widget_show (config_host);
        gtk_box_pack_start (GTK_BOX (hbox_manual1), config_host, FALSE, FALSE, 0);
-       gtk_tooltips_set_tip(tooltips, config_host,
-                            _("Hostname or IP for remote host running clamav daemon"),
-                            NULL);
+       gtk_widget_set_tooltip_text(config_host,
+                            _("Hostname or IP for remote host running clamav daemon"));
        SET_TOGGLE_SENSITIVITY (enable_clamav, config_host);
 
        blank = gtk_label_new("");
@@ -394,9 +383,8 @@ static void clamav_create_widget_func(PrefsPage * _page, GtkWindow *window, gpoi
        config_port = gtk_spin_button_new_with_range(0, 65535, 1);
        gtk_widget_show (config_port);
        gtk_box_pack_start (GTK_BOX (hbox_manual2), config_port, FALSE, FALSE, 0);
-       gtk_tooltips_set_tip(tooltips, config_port,
-                            _("Port number where clamav daemon is listening"),
-                            NULL);
+       gtk_widget_set_tooltip_text(config_port,
+                            _("Port number where clamav daemon is listening"));
 
        blank = gtk_label_new("");
        gtk_widget_show (blank);