[gthumb] removed unused utility functions



commit fdd2c09006eab56724ba85572b486eccb6479673
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sun Nov 13 15:13:34 2011 +0100

    removed unused utility functions

 gthumb/gtk-utils.c |  204 ----------------------------------------------------
 gthumb/gtk-utils.h |   16 ----
 2 files changed, 0 insertions(+), 220 deletions(-)
---
diff --git a/gthumb/gtk-utils.c b/gthumb/gtk-utils.c
index 6ce99b1..06b4463 100644
--- a/gthumb/gtk-utils.c
+++ b/gthumb/gtk-utils.c
@@ -21,7 +21,6 @@
 
 #include <config.h>
 #include <string.h>
-#include "gconf-utils.h"
 #include "gtk-utils.h"
 #include "pixbuf-utils.h"
 
@@ -276,209 +275,6 @@ _gtk_yesno_dialog_new (GtkWindow        *parent,
 }
 
 
-static void
-yesno__check_button_toggled_cb (GtkToggleButton *button,
-				const char      *gconf_key)
-{
-	eel_gconf_set_boolean (gconf_key,
-			       ! gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)));
-}
-
-
-GtkWidget*
-_gtk_yesno_dialog_with_checkbutton_new (GtkWindow        *parent,
-					GtkDialogFlags    flags,
-					const char       *message,
-					const char       *no_button_text,
-					const char       *yes_button_text,
-					const char       *check_button_label,
-					const char       *gconf_key)
-{
-	GtkWidget *d;
-	GtkWidget *label;
-	GtkWidget *image;
-	GtkWidget *hbox;
-	GtkWidget *button;
-	GtkWidget *check_button;
-	char      *stock_id = GTK_STOCK_DIALOG_QUESTION;
-
-	d = gtk_dialog_new_with_buttons ("", parent, flags, NULL);
-	gtk_window_set_resizable (GTK_WINDOW (d), FALSE);
-
-	gtk_container_set_border_width (GTK_CONTAINER (d), 6);
-	gtk_container_set_border_width (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (d))), 6);
-	gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (d))), 8);
-
-	/* Add label and image */
-
-	image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_DIALOG);
-	gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0);
-
-	label = gtk_label_new (message);
-	gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
-	gtk_label_set_selectable (GTK_LABEL (label), TRUE);
-
-	hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
-	gtk_container_set_border_width (GTK_CONTAINER (hbox), 6);
-
-	gtk_box_pack_start (GTK_BOX (hbox), image,
-			    FALSE, FALSE, 0);
-
-	gtk_box_pack_start (GTK_BOX (hbox), label,
-			    TRUE, TRUE, 0);
-
-	gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (d))),
-			    hbox,
-			    FALSE, FALSE, 0);
-
-	/* Add checkbutton */
-
-	check_button = gtk_check_button_new_with_mnemonic (check_button_label);
-	gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (d))),
-			    check_button,
-			    FALSE, FALSE, 0);
-	gtk_widget_show (check_button);
-
-	gtk_widget_show_all (hbox);
-
-	/* Add buttons */
-
-	button = _gtk_button_new_from_stock_with_text (GTK_STOCK_CANCEL, no_button_text);
-	gtk_dialog_add_action_widget (GTK_DIALOG (d),
-				      button,
-				      GTK_RESPONSE_CANCEL);
-
-	/**/
-
-	button = _gtk_button_new_from_stock_with_text (GTK_STOCK_OK, yes_button_text);
-	gtk_dialog_add_action_widget (GTK_DIALOG (d),
-				      button,
-				      GTK_RESPONSE_YES);
-
-	/**/
-
-	gtk_dialog_set_default_response (GTK_DIALOG (d), GTK_RESPONSE_YES);
-
-	g_signal_connect (G_OBJECT (check_button),
-			  "toggled",
-			  G_CALLBACK (yesno__check_button_toggled_cb),
-			  (gpointer) gconf_key);
-
-	return d;
-}
-
-
-GtkWidget*
-_gtk_message_dialog_with_checkbutton_new (GtkWindow        *parent,
-			 		  GtkDialogFlags    flags,
-			 		  const char       *stock_id,
-			 		  const char       *message,
-			 		  const char       *secondary_message,
-			 		  const char       *gconf_key,
-			 		  const char       *check_button_label,
-			 		  const char       *first_button_text,
-			 		  ...)
-{
-	GtkWidget  *d;
-	GtkWidget  *label;
-	GtkWidget  *image;
-	GtkWidget  *hbox;
-	GtkWidget  *check_button;
-	va_list     args;
-	const char *text;
-	int         response_id;
-	char       *escaped_message, *markup_text;
-
-	g_return_val_if_fail (message != NULL, NULL);
-
-	if (stock_id == NULL)
-		stock_id = GTK_STOCK_DIALOG_INFO;
-
-	d = gtk_dialog_new_with_buttons ("", parent, flags, NULL);
-	gtk_window_set_resizable (GTK_WINDOW (d), FALSE);
-
-	gtk_container_set_border_width (GTK_CONTAINER (d), 6);
-	gtk_container_set_border_width (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (d))), 6);
-	gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (d))), 8);
-
-	/* Add label and image */
-
-	image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_DIALOG);
-	gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0);
-
-	label = gtk_label_new ("");
-
-	escaped_message = g_markup_escape_text (message, -1);
-	if (secondary_message != NULL) {
-		char *escaped_secondary_message = g_markup_escape_text (secondary_message, -1);
-		markup_text = g_strdup_printf ("<span weight=\"bold\" size=\"larger\">%s</span>\n\n%s",
-					       escaped_message,
-					       escaped_secondary_message);
-		g_free (escaped_secondary_message);
-	} else
-		markup_text = g_strdup (escaped_message);
-	gtk_label_set_markup (GTK_LABEL (label), markup_text);
-	g_free (markup_text);
-	g_free (escaped_message);
-
-	gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
-	gtk_label_set_selectable (GTK_LABEL (label), TRUE);
-
-	hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
-	gtk_container_set_border_width (GTK_CONTAINER (hbox), 6);
-
-	gtk_box_pack_start (GTK_BOX (hbox), image,
-			    FALSE, FALSE, 0);
-
-	gtk_box_pack_start (GTK_BOX (hbox), label,
-			    TRUE, TRUE, 0);
-
-	gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (d))),
-			    hbox,
-			    FALSE, FALSE, 0);
-
-	gtk_widget_show_all (hbox);
-
-	/* Add checkbutton */
-
-	check_button = gtk_check_button_new_with_mnemonic (check_button_label);
-	gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (d))),
-			    check_button,
-			    FALSE, FALSE, 0);
-	gtk_widget_show (check_button);
-
-	/* Add buttons */
-
-	if (first_button_text == NULL)
-		return d;
-
-	va_start (args, first_button_text);
-
-	text = first_button_text;
-	response_id = va_arg (args, gint);
-
-	while (text != NULL) {
-		gtk_dialog_add_button (GTK_DIALOG (d), text, response_id);
-
-		text = va_arg (args, gchar*);
-		if (text == NULL)
-			break;
-		response_id = va_arg (args, int);
-	}
-
-	va_end (args);
-
-	gtk_dialog_set_default_response (GTK_DIALOG (d), GTK_RESPONSE_YES);
-
-	g_signal_connect (G_OBJECT (check_button),
-			  "toggled",
-			  G_CALLBACK (yesno__check_button_toggled_cb),
-			  (gpointer) gconf_key);
-
-	return d;
-}
-
-
 void
 _gtk_error_dialog_from_gerror_run (GtkWindow   *parent,
 				   const char  *title,
diff --git a/gthumb/gtk-utils.h b/gthumb/gtk-utils.h
index 3cffc2b..fa702cd 100644
--- a/gthumb/gtk-utils.h
+++ b/gthumb/gtk-utils.h
@@ -58,27 +58,11 @@ GtkWidget *     _gtk_message_dialog_new                    (GtkWindow        *pa
 							    const char       *secondary_message,
 							    const char       *first_button_text,
 							    ...);
-GtkWidget *     _gtk_message_dialog_with_checkbutton_new   (GtkWindow        *parent,
-			 				    GtkDialogFlags    flags,
-			 				    const char       *stock_id,
-			 				    const char       *message,
-			 				    const char       *secondary_message,
-			 				    const char       *gconf_key,
-			 				    const char       *check_button_label,
-			 				    const char       *first_button_text,
-			 				    ...);
 GtkWidget *     _gtk_yesno_dialog_new                      (GtkWindow        *parent,
 							    GtkDialogFlags    flags,
 							    const char       *message,
 							    const char       *no_button_text,
 							    const char       *yes_button_text);
-GtkWidget *     _gtk_yesno_dialog_with_checkbutton_new     (GtkWindow        *parent,
-							    GtkDialogFlags    flags,
-							    const char       *message,
-							    const char       *no_button_text,
-							    const char       *yes_button_text,
-							    const char       *check_button_label,
-							    const char       *gconf_key);
 void            _gtk_error_dialog_from_gerror_run          (GtkWindow        *parent,
 					    	    	    const char       *title,
 					    	    	    GError           *gerror);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]