Trim trailing white spaces on empty lines.
[geeqie.git] / src / ui_misc.c
index 2aef411..461e1ee 100644 (file)
@@ -543,15 +543,6 @@ GtkWidget *pref_spin_new_int(GtkWidget *parent_box, const gchar *text, const gch
                             G_CALLBACK(pref_spin_int_cb), value_var);
 }
 
-#if 0
-void pref_spin_set_blocking(GtkWidget *spin, gdouble value, gpointer block_data)
-{
-       g_signal_handlers_block_matched(G_OBJECT(spin), G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, block_data);
-       gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin), value);
-       g_signal_handlers_unblock_matched(G_OBJECT(spin), G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, block_data);
-}
-#endif
-
 static void pref_link_sensitivity_cb(GtkWidget *watch, GtkStateType prev_state, gpointer data)
 {
        GtkWidget *widget = data;
@@ -658,25 +649,6 @@ GtkWidget *pref_table_button(GtkWidget *table, gint column, gint row,
        return button;
 }
 
-#if 0
-static GtkWidget *pref_table_checkbox(GtkWidget *table, gint column, gint row,
-                                     const gchar *text, gint active,
-                                     GCallback func, gpointer data)
-{
-       GtkWidget *button;
-
-       button = gtk_check_button_new_with_label(text);
-       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), active);
-       if (func) g_signal_connect(G_OBJECT(button), "clicked", func, data);
-
-       gtk_table_attach(GTK_TABLE(table), button, column, column + 1, row, row + 1,
-                        GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-       gtk_widget_show(button);
-
-       return button;
-}
-#endif
-
 GtkWidget *pref_table_spin(GtkWidget *table, gint column, gint row,
                           const gchar *text, const gchar *suffix,
                           gdouble min, gdouble max, gdouble step, gint digits,
@@ -740,7 +712,7 @@ GtkWidget *pref_table_spin_new_int(GtkWidget *table, gint column, gint row,
 GtkWidget *pref_toolbar_new(GtkWidget *parent_box, GtkToolbarStyle style)
 {
        GtkWidget *tbar;
-       
+
        tbar = gtk_toolbar_new();
        gtk_toolbar_set_style(GTK_TOOLBAR(tbar), style);
 
@@ -981,7 +953,7 @@ static void date_selection_popup(DateSelection *ds)
 
        gtk_widget_get_allocation(ds->button, &button_allocation);
        gtk_widget_get_allocation(ds->window, &window_allocation);
-       
+
        x = wx + button_allocation.x + button_allocation.width - window_allocation.width;
        y = wy + button_allocation.y + button_allocation.height;
 
@@ -1324,12 +1296,24 @@ static gboolean sizer_leave_cb(GtkWidget *widget, GdkEventCrossing *event, gpoin
 
 static gboolean sizer_expose_cb(GtkWidget *widget, GdkEventExpose *event, gpointer data)
 {
+#if GTK_CHECK_VERSION(3,0,0)
+       GtkAllocation allocation;
+
+       gtk_widget_get_allocation(widget, &allocation);
+
+       cairo_t *cr = gdk_cairo_create(gtk_widget_get_window(widget));
+
+       gtk_render_handle (gtk_widget_get_style_context (widget),
+                          cr, allocation.x, allocation.y, allocation.width, allocation.height);
+       cairo_destroy(cr);
+#else
        SizerData *sd = data;
        GdkRectangle clip;
        GtkOrientation orientation;
        GtkStateType state;
        GtkAllocation allocation;
 
+       gtk_widget_get_allocation(widget, &allocation);
 
        if (sd->position & SIZER_POS_LEFT || sd->position & SIZER_POS_RIGHT)
                {
@@ -1349,14 +1333,6 @@ static gboolean sizer_expose_cb(GtkWidget *widget, GdkEventExpose *event, gpoint
                state = gtk_widget_get_state(widget);
                }
 
-       gtk_widget_get_allocation(widget, &allocation);
-#if GTK_CHECK_VERSION(3,0,0)
-       cairo_t *cr = gdk_cairo_create(gtk_widget_get_window(widget));
-
-       gtk_render_handle (gtk_widget_get_style_context (widget),
-                          cr, allocation.x, allocation.y, allocation.width, allocation.height);    
-       cairo_destroy(cr);
-#else
        gdk_region_get_clipbox(event->region, &clip);
 
        gtk_paint_handle(gtk_widget_get_style(widget), gtk_widget_get_window(widget), state,