• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

作図ソフト dia の改良版


Commit MetaInfo

Révision446a48ec2b74d36098832c04d0be092361d5a219 (tree)
l'heure2015-01-12 05:11:47
AuteurHans Breuer <hans@breu...>
CommiterHans Breuer

Message de Log

Move navigation button to top-left corner for integrated GUI

Change Summary

Modification

--- a/app/interface.c
+++ b/app/interface.c
@@ -511,7 +511,7 @@ _ddisplay_setup_scrollbars (DDisplay *ddisp, GtkWidget *table, int width, int he
511511 gtk_widget_show (ddisp->vsb);
512512 }
513513 static void
514-_ddisplay_setup_navigation (DDisplay *ddisp, GtkWidget *table)
514+_ddisplay_setup_navigation (DDisplay *ddisp, GtkWidget *table, gboolean top_left)
515515 {
516516 GtkWidget *navigation_button;
517517
@@ -522,8 +522,14 @@ _ddisplay_setup_navigation (DDisplay *ddisp, GtkWidget *table)
522522 gtk_widget_show(navigation_button);
523523
524524 /* harder to change position in the table, but we did not do it for years ;) */
525- gtk_table_attach (GTK_TABLE (table), navigation_button, 2, 3, 2, 3,
526- GTK_FILL, GTK_FILL, 0, 0);
525+ if (top_left)
526+ gtk_table_attach (GTK_TABLE (table), navigation_button, 0, 1, 0, 1,
527+ GTK_FILL, GTK_FILL, 0, 0);
528+ else
529+ gtk_table_attach (GTK_TABLE (table), navigation_button, 2, 3, 2, 3,
530+ GTK_FILL, GTK_FILL, 0, 0);
531+ if (!ddisp->origin)
532+ ddisp->origin = g_object_ref (navigation_button);
527533 }
528534 /**
529535 * @param ddisp The diagram display object that a window is created for
@@ -599,9 +605,7 @@ use_integrated_ui_for_display_shell(DDisplay *ddisp, char *title)
599605 gtk_box_pack_start( GTK_BOX(ddisp->container), table, TRUE, TRUE, 0 );
600606
601607 /* scrollbars, rulers, canvas, menu popup button */
602- ddisp->origin = gtk_frame_new (NULL);
603- gtk_frame_set_shadow_type (GTK_FRAME (ddisp->origin), GTK_SHADOW_OUT);
604-
608+ ddisp->origin = NULL;
605609 _ddisplay_setup_rulers (ddisp, ddisp->container, table);
606610
607611 /* Get the width/height of the Notebook child area */
@@ -609,13 +613,11 @@ use_integrated_ui_for_display_shell(DDisplay *ddisp, char *title)
609613 width = 100;
610614 height = 100;
611615 _ddisplay_setup_scrollbars (ddisp, table, width, height);
612- _ddisplay_setup_navigation (ddisp, table);
616+ _ddisplay_setup_navigation (ddisp, table, TRUE);
613617
614618 ddisp->canvas = create_canvas (ddisp);
615619
616- /* place all remaining widgets */
617- gtk_table_attach (GTK_TABLE (table), ddisp->origin, 0, 1, 0, 1,
618- GTK_FILL, GTK_FILL, 0, 0);
620+ /* place all remaining widgets (no 'origin' anymore, since navigation is top-left */
619621 gtk_table_attach (GTK_TABLE (table), ddisp->canvas, 1, 2, 1, 2,
620622 GTK_EXPAND | GTK_SHRINK | GTK_FILL,
621623 GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, 0);
@@ -745,7 +747,7 @@ create_display_shell(DDisplay *ddisp,
745747
746748 _ddisplay_setup_rulers (ddisp, ddisp->shell, table);
747749 _ddisplay_setup_scrollbars (ddisp, table, width, height);
748- _ddisplay_setup_navigation (ddisp, table);
750+ _ddisplay_setup_navigation (ddisp, table, FALSE);
749751
750752 ddisp->canvas = create_canvas (ddisp);
751753
@@ -760,8 +762,7 @@ create_display_shell(DDisplay *ddisp,
760762 ddisp->accel_group = menus_get_display_accels ();
761763 gtk_window_add_accel_group(GTK_WINDOW(ddisp->shell), ddisp->accel_group);
762764
763- if (use_mbar)
764- {
765+ if (use_mbar) {
765766 ddisp->menu_bar = menus_create_display_menubar (&ddisp->ui_manager, &ddisp->actions);
766767 g_assert (ddisp->menu_bar);
767768 gtk_box_pack_start (GTK_BOX (root_vbox), ddisp->menu_bar, FALSE, TRUE, 0);