[dia] [diagram-tree] Get rid of the old one ;)
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] [diagram-tree] Get rid of the old one ;)
- Date: Tue, 3 Aug 2010 15:21:34 +0000 (UTC)
commit 97e44bb0114a146df6753f19cb14d178ae6b4b35
Author: Hans Breuer <hans breuer org>
Date: Tue Aug 3 17:18:41 2010 +0200
[diagram-tree] Get rid of the old one ;)
app/Makefile.am | 9 -
app/app_procs.c | 7 +-
app/diagram_tree.c | 772 -------------------------------------
app/diagram_tree.h | 108 -----
app/diagram_tree_menu.c | 270 -------------
app/diagram_tree_menu.h | 55 ---
app/diagram_tree_menu_callbacks.c | 107 -----
app/diagram_tree_menu_callbacks.h | 69 ----
app/diagram_tree_view.c | 6 +
app/diagram_tree_window.c | 158 --------
app/diagram_tree_window.h | 51 ---
app/interface.c | 8 -
app/interface.h | 1 -
app/makefile.msc | 4 -
app/menus.c | 20 +-
app/preferences.c | 14 +-
app/preferences.h | 10 +-
17 files changed, 16 insertions(+), 1653 deletions(-)
---
diff --git a/app/Makefile.am b/app/Makefile.am
index ef57ba2..2538507 100644
--- a/app/Makefile.am
+++ b/app/Makefile.am
@@ -168,15 +168,6 @@ dia_core_files = \
dia-app-icons.h \
recent_files.h \
recent_files.c \
- diagram_tree.h \
- diagram_tree.c \
- \
- diagram_tree_window.h \
- diagram_tree_window.c \
- diagram_tree_menu.h \
- diagram_tree_menu.c \
- diagram_tree_menu_callbacks.h \
- diagram_tree_menu_callbacks.c \
\
dia-application.h \
dia-application.c \
diff --git a/app/app_procs.c b/app/app_procs.c
index 61f7a4f..1f5e0c8 100644
--- a/app/app_procs.c
+++ b/app/app_procs.c
@@ -944,9 +944,10 @@ app_init (int argc, char **argv)
g_timeout_add(5*60*1000, autosave_check_autosave, NULL);
#endif
- /* Create Diagram Tree Window */
- create_tree_window();
-
+#if 0 /* do we really open these automatically in the next session? */
+ persistence_register_window_create("diagram_tree",
+ &diagram_tree_show);
+#endif
persistence_register_window_create("sheets_main_dialog",
(NullaryFunc*)&sheets_dialog_create);
diff --git a/app/diagram_tree_view.c b/app/diagram_tree_view.c
index a2911c0..6ec4091 100644
--- a/app/diagram_tree_view.c
+++ b/app/diagram_tree_view.c
@@ -37,6 +37,7 @@
#include "display.h"
#include "properties-dialog.h" /* object_list_properties_show */
#include "dia-props.h" /* diagram_properties_show */
+#include "persistence.h"
typedef struct _DiagramTreeView DiagramTreeView;
struct _DiagramTreeView {
@@ -573,12 +574,17 @@ diagram_tree_show (void)
G_CALLBACK (gtk_widget_destroyed),
&window);
+ gtk_window_set_role (GTK_WINDOW (window), "diagram_tree");
+
#if GTK_CHECK_VERSION(2,20,0)
if (!gtk_widget_get_visible (window))
#else
if (!GTK_WIDGET_VISIBLE (window))
#endif
gtk_widget_show_all (window);
+
+ /* FIXME: remove flicker by removing gtk_widget_show from persistence_register_window() */
+ persistence_register_window (GTK_WINDOW (window));
}
gtk_window_present (GTK_WINDOW(window));
}
diff --git a/app/interface.c b/app/interface.c
index ba7c79a..ac14bb0 100644
--- a/app/interface.c
+++ b/app/interface.c
@@ -39,7 +39,6 @@
#include "preferences.h"
#include "commands.h"
#include "dia_dirs.h"
-#include "diagram_tree_window.h"
#include "intl.h"
#include "navigation.h"
#include "persistence.h"
@@ -1839,13 +1838,6 @@ toolbox_hide(void)
gtk_widget_hide(toolbox_shell);
}
-void
-create_tree_window(void)
-{
- GtkAction *action = menus_get_action ("FileTree");
- create_diagram_tree_window(&prefs.dia_tree, GTK_TOGGLE_ACTION(action));
-}
-
GtkWidget *
interface_get_toolbox_shell(void)
{
diff --git a/app/interface.h b/app/interface.h
index d0c081f..5822d82 100644
--- a/app/interface.h
+++ b/app/interface.h
@@ -65,7 +65,6 @@ GtkWidget *interface_get_toolbox_shell(void);
void tool_select_callback(GtkWidget *widget, gpointer data);
void create_integrated_ui (void);
-void create_tree_window(void);
void create_sheets(GtkWidget *parent);
extern GtkWidget *modify_tool_button;
diff --git a/app/makefile.msc b/app/makefile.msc
index 57f79fe..5a5c72c 100644
--- a/app/makefile.msc
+++ b/app/makefile.msc
@@ -28,10 +28,6 @@ OBJECTS = \
defaults.obj \
diacanvas.obj \
diagram.obj \
- diagram_tree.obj \
- diagram_tree_menu.obj \
- diagram_tree_menu_callbacks.obj \
- diagram_tree_window.obj \
diapagelayout.obj \
dia-props.obj \
disp_callbacks.obj \
diff --git a/app/menus.c b/app/menus.c
index 16954aa..8e8893f 100644
--- a/app/menus.c
+++ b/app/menus.c
@@ -38,7 +38,6 @@
#include "plugin-manager.h"
#include "select.h"
#include "dia_dirs.h"
-#include "diagram_tree_window.h"
#include "object_ops.h"
#include "sheets.h"
#include "dia-app-icons.h"
@@ -86,20 +85,15 @@ static const GtkActionEntry common_entries[] =
{ "HelpAbout", GTK_STOCK_ABOUT, NULL, NULL, NULL, G_CALLBACK (help_about_callback) }
};
+extern void diagram_tree_show(void);
+
/* Actions for toolbox menu */
static const GtkActionEntry toolbox_entries[] =
{
{ "FileSheets", NULL, N_("Sheets and Objectsâ?¦"), "F9", NULL, G_CALLBACK (sheets_dialog_show_callback) },
{ "FilePrefs", GTK_STOCK_PREFERENCES, NULL, NULL, NULL, G_CALLBACK (file_preferences_callback) },
- { "FilePlugins", NULL, N_("Pluginsâ?¦"), NULL, NULL, G_CALLBACK (file_plugins_callback) }
-};
-
-extern void diagram_tree_show(void);
-/* Toggle-Actions for toolbox menu */
-static const GtkToggleActionEntry toolbox_toggle_entries[] =
-{
- { "FileTree", NULL, N_("_Diagram Treeâ?¦"), "F8", NULL, G_CALLBACK (diagtree_show_callback) },
- { "DiagramTree", NULL, N_("_Diagram tree"), NULL, NULL, G_CALLBACK (diagram_tree_show) }
+ { "FilePlugins", NULL, N_("Pluginsâ?¦"), NULL, NULL, G_CALLBACK (file_plugins_callback) },
+ { "FileTree", NULL, N_("_Diagram Treeâ?¦"), "F8", NULL, G_CALLBACK (diagram_tree_show) }
};
/* Toggle-Actions for toolbox menu */
@@ -876,9 +870,6 @@ menus_init(void)
G_N_ELEMENTS (common_entries), NULL);
gtk_action_group_add_actions (toolbox_actions, toolbox_entries,
G_N_ELEMENTS (toolbox_entries), NULL);
- gtk_action_group_add_toggle_actions (toolbox_actions, toolbox_toggle_entries,
- G_N_ELEMENTS (toolbox_toggle_entries),
- NULL);
toolbox_ui_manager = gtk_ui_manager_new ();
g_signal_connect (G_OBJECT (toolbox_ui_manager),
@@ -967,9 +958,6 @@ menus_get_integrated_ui_menubar (GtkWidget **menubar,
G_N_ELEMENTS (display_entries), NULL);
gtk_action_group_add_toggle_actions (integrated_ui_actions, integrated_ui_view_toggle_entries,
G_N_ELEMENTS (integrated_ui_view_toggle_entries), NULL);
- gtk_action_group_add_toggle_actions (integrated_ui_actions, toolbox_toggle_entries,
- G_N_ELEMENTS (toolbox_toggle_entries),
- NULL);
gtk_action_group_add_toggle_actions (integrated_ui_actions, display_toggle_entries,
G_N_ELEMENTS (display_toggle_entries),
NULL);
diff --git a/app/preferences.c b/app/preferences.c
index 27e31da..c0bd73f 100644
--- a/app/preferences.c
+++ b/app/preferences.c
@@ -92,8 +92,6 @@ static int default_undo_depth = 15;
static guint default_recent_documents = 5;
static Color default_colour = DEFAULT_GRID_COLOR;
static Color pbreak_colour = DEFAULT_PAGEBREAK_COLOR;
-static guint default_dtree_dia_sort = DIA_TREE_SORT_INSERT;
-static guint default_dtree_obj_sort = DIA_TREE_SORT_INSERT;
static const gchar *default_paper_name = NULL;
static const gchar *default_length_unit = "Centimeter";
static const gchar *default_fontsize_unit = "Point";
@@ -111,8 +109,7 @@ typedef enum {
DIA_TAB,
VIEW_TAB,
FAVOR_TAB,
- GRID_TAB,
- TREE_TAB
+ GRID_TAB
} TabIndex;
struct DiaPrefsTab prefs_tabs[] =
@@ -122,7 +119,6 @@ struct DiaPrefsTab prefs_tabs[] =
{N_("View Defaults"), NULL, 0},
{N_("Favorites"), NULL, 0},
{N_("Grid Lines"), NULL, 0},
- {N_("Diagram Tree"), NULL, 0},
};
#define NUM_PREFS_TABS (sizeof(prefs_tabs)/sizeof(struct DiaPrefsTab))
@@ -256,14 +252,6 @@ DiaPrefData prefs_data[] =
&default_true,0,"pretty formated xml",NULL, TRUE},
*/
- { NULL, PREF_NONE, 0, NULL, TREE_TAB, N_("Diagram tree window:") },
- { "diagram_tree_save_hidden", PREF_BOOLEAN, PREF_OFFSET(dia_tree.save_hidden),
- &default_false, TREE_TAB, N_("Save hidden object types")},
- { "diagram_tree_dia_sort", PREF_UINT, PREF_OFFSET(dia_tree.dia_sort),
- &default_dtree_dia_sort, TREE_TAB, "default diagram sort order", NULL, TRUE},
- { "diagram_tree_obj_sort", PREF_UINT, PREF_OFFSET(dia_tree.obj_sort),
- &default_dtree_obj_sort, TREE_TAB, "default object sort order", NULL, TRUE},
- { NULL, PREF_END_GROUP, 0, NULL, TREE_TAB, NULL },
};
#define NUM_PREFS_DATA (sizeof(prefs_data)/sizeof(DiaPrefData))
diff --git a/app/preferences.h b/app/preferences.h
index 24241a0..82d6e60 100644
--- a/app/preferences.h
+++ b/app/preferences.h
@@ -18,11 +18,7 @@
#ifndef PREFERENCES_H
#define PREFERENCES_H
-#include "geometry.h"
-#include "color.h"
-#include "diagram_tree_window.h"
#include "diagramdata.h"
-#include "lib/widgets.h"
#define DEFAULT_GRID_COLOR { 0.85, .90, .90 }
#define DEFAULT_PAGEBREAK_COLOR { 0.0, 0.0, 0.6 }
@@ -71,8 +67,6 @@ struct DiaPreferences {
int toolbox_on_top;
- DiagramTreeConfig dia_tree;
-
int use_integrated_ui;
/* a dedicated filter name or NULL */
@@ -93,6 +87,4 @@ void prefs_set_defaults(void);
void prefs_save(void);
void prefs_init(void);
-#endif /* DIA_IMAGE_H */
-
-
+#endif /* PREFERENCES_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]