[dia] [restructuring] remove superfluous code and whitespace
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] [restructuring] remove superfluous code and whitespace
- Date: Sun, 19 Aug 2012 17:38:26 +0000 (UTC)
commit 85eb11f52871ca531ea7c277341422c357c008e1
Author: Hans Breuer <hans breuer org>
Date: Sun Aug 5 20:11:42 2012 +0200
[restructuring] remove superfluous code and whitespace
The check for (!gtk_window_get_icon (GTK_WINDOW (window)))
already is done in app_set_icon()
app/interface.c | 32 +++-----------------------------
lib/diaarrowchooser.c | 14 --------------
2 files changed, 3 insertions(+), 43 deletions(-)
---
diff --git a/app/interface.c b/app/interface.c
index ceecfad..5d20db1 100644
--- a/app/interface.c
+++ b/app/interface.c
@@ -53,9 +53,6 @@
#include "dia-app-icons.h"
static void
-use_integrated_ui_for_display_shell(DDisplay *ddisp, char *title);
-
-static void
dia_dnd_file_drag_data_received (GtkWidget *widget,
GdkDragContext *context,
gint x,
@@ -472,30 +469,23 @@ static void
use_integrated_ui_for_display_shell(DDisplay *ddisp, char *title)
{
GtkWidget *table;
- /* GtkWidget *status_hbox; */
- /* GtkWidget *zoom_hbox, *zoom_label; */
GtkWidget *label; /* Text label for the notebook page */
GtkWidget *tab_label_container; /* Container to hold text label & close button */
int width, height; /* Width/Heigth of the diagram */
GtkWidget *image;
GtkWidget *close_button; /* Close button for the notebook page */
- /* GtkWidget *widget; */
GtkRcStyle *rcstyle;
gint notebook_page_index;
-
+
ddisp->is_standalone_window = FALSE;
ddisp->shell = GTK_WIDGET (ui.main_window);
-
- /* Statusbar */
ddisp->modified_status = GTK_WIDGET (ui.statusbar);
tab_label_container = gtk_hbox_new(FALSE,3);
-
label = gtk_label_new( title );
gtk_box_pack_start( GTK_BOX(tab_label_container), label, FALSE, FALSE, 0 );
gtk_widget_show (label);
-
/* Create a new tab page */
ddisp->container = gtk_vbox_new(FALSE, 0);
@@ -567,16 +557,12 @@ use_integrated_ui_for_display_shell(DDisplay *ddisp, char *title)
GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, 0);
ddisp->common_toolbar = ui.toolbar;
-
/* Stand-alone window menubar */
ddisp->menu_bar = NULL;
-
/* Stand-alone window Zoom status/menu */
ddisp->zoom_status = NULL;
-
/* Stand-alone window Grid on/off button */
ddisp->grid_status = NULL;
-
/* Stand-alone window Object Snapping button */
ddisp->mainpoint_status = NULL;
@@ -589,7 +575,6 @@ use_integrated_ui_for_display_shell(DDisplay *ddisp, char *title)
gtk_notebook_set_current_page (ui.diagram_notebook, notebook_page_index);
integrated_ui_toolbar_grid_snap_synchronize_to_display (ddisp);
-
integrated_ui_toolbar_object_snap_synchronize_to_display (ddisp);
/* TODO: Figure out how to detect if anti-aliased renderer was set */
@@ -630,7 +615,6 @@ create_display_shell(DDisplay *ddisp,
ddisp->is_standalone_window = TRUE;
ddisp->container = NULL;
-
s_width = gdk_screen_width ();
s_height = gdk_screen_height ();
if (width > s_width)
@@ -1004,21 +988,11 @@ create_toolbox ()
gtk_window_set_default_size(GTK_WINDOW(window), 146, 349);
app_set_icon (GTK_WINDOW (window));
- if (!gtk_window_get_icon (GTK_WINDOW (window))) {
- GdkPixbuf *pixbuf = gdk_pixbuf_new_from_inline (-1, dia_app_icon, FALSE, NULL);
- if (pixbuf) {
- gtk_window_set_icon (GTK_WINDOW (window), pixbuf);
- g_object_unref (pixbuf);
- }
- }
g_signal_connect (G_OBJECT (window), "delete_event",
- G_CALLBACK (toolbox_delete),
- window);
-
+ G_CALLBACK (toolbox_delete), window);
g_signal_connect (G_OBJECT (window), "destroy",
- G_CALLBACK (toolbox_destroy),
- window);
+ G_CALLBACK (toolbox_destroy), window);
main_vbox = gtk_vbox_new (FALSE, 1);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 1);
diff --git a/lib/diaarrowchooser.c b/lib/diaarrowchooser.c
index 80454ed..5185a94 100644
--- a/lib/diaarrowchooser.c
+++ b/lib/diaarrowchooser.c
@@ -44,20 +44,6 @@ _dia_translate (const gchar* term, gpointer data)
/* ... than gtk */
if (term == trans)
trans = dgettext ("gtk20", term);
-#if 0
- /* FIXME: final fallback */
- if (term == trans) { /* FIXME: translation to be updated */
- gchar* kludge = g_strdup_printf ("/%s", term);
- trans = dgettext (GETTEXT_PACKAGE, kludge);
- if (kludge == trans)
- trans = term;
- else
- ++trans;
- g_free (kludge);
- }
- if (term == trans)
- trans = g_strdup_printf ("XXX: %s", term);
-#endif
}
return trans;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]