Removed some unused api, made some api private
parent
b9ffc63ecb
commit
742f6ad5fd
|
@ -176,7 +176,7 @@ prefs_page_init (MooPrefsDialogPage *page)
|
|||
default_lang_combo_set_lang (default_lang_combo, lang);
|
||||
|
||||
helper = g_object_get_data (G_OBJECT (page), "moo-tree-helper");
|
||||
moo_tree_helper_update_widgets (helper);
|
||||
_moo_tree_helper_update_widgets (helper);
|
||||
}
|
||||
|
||||
|
||||
|
@ -635,8 +635,8 @@ lang_combo_init (GtkComboBox *combo,
|
|||
gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (combo), cell,
|
||||
set_sensitive, NULL, NULL);
|
||||
|
||||
moo_combo_box_select_first (combo);
|
||||
helper = moo_tree_helper_new (GTK_WIDGET (combo), NULL, NULL, NULL, NULL);
|
||||
_moo_combo_box_select_first (combo);
|
||||
helper = _moo_tree_helper_new (GTK_WIDGET (combo), NULL, NULL, NULL, NULL);
|
||||
g_return_if_fail (helper != NULL);
|
||||
|
||||
g_object_set_data_full (G_OBJECT (page), "moo-tree-helper",
|
||||
|
@ -645,7 +645,7 @@ lang_combo_init (GtkComboBox *combo,
|
|||
G_CALLBACK (helper_update_widgets), page);
|
||||
g_signal_connect_swapped (helper, "update-model",
|
||||
G_CALLBACK (helper_update_model), page);
|
||||
moo_tree_helper_update_widgets (helper);
|
||||
_moo_tree_helper_update_widgets (helper);
|
||||
}
|
||||
|
||||
|
||||
|
@ -700,7 +700,7 @@ prefs_page_apply_lang_prefs (MooPrefsDialogPage *page)
|
|||
MooLangMgr *mgr;
|
||||
|
||||
helper = g_object_get_data (G_OBJECT (page), "moo-tree-helper");
|
||||
moo_tree_helper_update_model (helper, NULL, NULL);
|
||||
_moo_tree_helper_update_model (helper, NULL, NULL);
|
||||
|
||||
model = page_get_lang_model (page);
|
||||
g_return_if_fail (model != NULL);
|
||||
|
@ -848,7 +848,7 @@ filter_treeview_init (MooGladeXML *xml)
|
|||
create_filter_cell (filter_treeview, store, "Filter", FILTER_COLUMN_FILTER);
|
||||
create_filter_cell (filter_treeview, store, "Options", FILTER_COLUMN_CONFIG);
|
||||
|
||||
helper = moo_tree_helper_new (GTK_WIDGET (filter_treeview),
|
||||
helper = _moo_tree_helper_new (GTK_WIDGET (filter_treeview),
|
||||
moo_glade_xml_get_widget (xml, "new_filter_setting"),
|
||||
moo_glade_xml_get_widget (xml, "delete_filter_setting"),
|
||||
moo_glade_xml_get_widget (xml, "filter_setting_up"),
|
||||
|
|
|
@ -99,21 +99,21 @@ _as_plugin_prefs_page (MooPlugin *plugin)
|
|||
(GtkTreeCellDataFunc) pattern_data_func,
|
||||
NULL, NULL);
|
||||
|
||||
helper = moo_config_helper_new (treeview,
|
||||
helper = _moo_config_helper_new (treeview,
|
||||
moo_glade_xml_get_widget (xml, "new"),
|
||||
moo_glade_xml_get_widget (xml, "delete"),
|
||||
moo_glade_xml_get_widget (xml, "up"),
|
||||
moo_glade_xml_get_widget (xml, "down"));
|
||||
|
||||
moo_config_helper_add_widget (helper, moo_glade_xml_get_widget (xml, "pattern"),
|
||||
_moo_config_helper_add_widget (helper, moo_glade_xml_get_widget (xml, "pattern"),
|
||||
AS_KEY_PATTERN, TRUE);
|
||||
moo_config_helper_add_widget (helper, moo_glade_xml_get_widget (xml, "lang"),
|
||||
_moo_config_helper_add_widget (helper, moo_glade_xml_get_widget (xml, "lang"),
|
||||
AS_KEY_LANG, FALSE);
|
||||
moo_config_helper_add_widget (helper, moo_glade_xml_get_widget (xml, "enabled"),
|
||||
_moo_config_helper_add_widget (helper, moo_glade_xml_get_widget (xml, "enabled"),
|
||||
AS_KEY_ENABLED, TRUE);
|
||||
moo_config_helper_add_widget (helper, moo_glade_xml_get_widget (xml, "word_boundary"),
|
||||
_moo_config_helper_add_widget (helper, moo_glade_xml_get_widget (xml, "word_boundary"),
|
||||
AS_KEY_WORD_BOUNDARY, FALSE);
|
||||
moo_config_helper_add_widget (helper, moo_glade_xml_get_widget (xml, "script"),
|
||||
_moo_config_helper_add_widget (helper, moo_glade_xml_get_widget (xml, "script"),
|
||||
NULL, FALSE);
|
||||
|
||||
g_signal_connect (helper, "new-item",
|
||||
|
@ -160,7 +160,7 @@ prefs_page_apply (MooGladeXML *xml)
|
|||
|
||||
treeview = moo_glade_xml_get_widget (xml, "treeview");
|
||||
helper = g_object_get_data (G_OBJECT (treeview), "as-plugin-config-helper");
|
||||
moo_config_helper_update_model (helper, NULL, NULL);
|
||||
_moo_config_helper_update_model (helper, NULL, NULL);
|
||||
|
||||
config = MOO_CONFIG (gtk_tree_view_get_model (GTK_TREE_VIEW (treeview)));
|
||||
|
||||
|
@ -195,7 +195,7 @@ prefs_page_init (MooGladeXML *xml)
|
|||
|
||||
treeview = moo_glade_xml_get_widget (xml, "treeview");
|
||||
gtk_tree_view_set_model (GTK_TREE_VIEW (treeview), GTK_TREE_MODEL (config));
|
||||
moo_tree_view_select_first (GTK_TREE_VIEW (treeview));
|
||||
_moo_tree_view_select_first (GTK_TREE_VIEW (treeview));
|
||||
|
||||
g_object_unref (config);
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ _moo_file_selector_prefs_page (MooPlugin *plugin)
|
|||
gtk_tree_view_set_model (GTK_TREE_VIEW (treeview), GTK_TREE_MODEL (store));
|
||||
g_object_unref (store);
|
||||
|
||||
helper = moo_tree_helper_new (treeview,
|
||||
helper = _moo_tree_helper_new (treeview,
|
||||
moo_glade_xml_get_widget (xml, "new"),
|
||||
moo_glade_xml_get_widget (xml, "delete"),
|
||||
moo_glade_xml_get_widget (xml, "up"),
|
||||
|
@ -194,7 +194,7 @@ prefs_page_apply (MooGladeXML *xml)
|
|||
gpointer store = gtk_tree_view_get_model (treeview);
|
||||
MooTreeHelper *helper = g_object_get_data (G_OBJECT (xml), "moo-tree-helper");
|
||||
|
||||
moo_tree_helper_update_model (helper, NULL, NULL);
|
||||
_moo_tree_helper_update_model (helper, NULL, NULL);
|
||||
save_store (store);
|
||||
_moo_file_selector_update_tools (g_object_get_data (G_OBJECT (xml), "moo-file-selector-plugin"));
|
||||
}
|
||||
|
@ -262,8 +262,8 @@ prefs_page_init (MooGladeXML *xml)
|
|||
GtkWidget *treeview = moo_glade_xml_get_widget (xml, "treeview");
|
||||
gpointer store = gtk_tree_view_get_model (GTK_TREE_VIEW (treeview));
|
||||
populate_store (store);
|
||||
moo_tree_view_select_first (GTK_TREE_VIEW (treeview));
|
||||
moo_tree_helper_update_widgets (g_object_get_data (G_OBJECT (xml), "moo-tree-helper"));
|
||||
_moo_tree_view_select_first (GTK_TREE_VIEW (treeview));
|
||||
_moo_tree_helper_update_widgets (g_object_get_data (G_OBJECT (xml), "moo-tree-helper"));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -247,6 +247,7 @@
|
|||
|
||||
|
||||
(include "moofileview.defs")
|
||||
(include "subdir/moofileview.defs")
|
||||
|
||||
|
||||
;; Enumerations and flags ...
|
||||
|
@ -1494,18 +1495,6 @@
|
|||
)
|
||||
)
|
||||
|
||||
(define-method get_name
|
||||
(of-object "MooWindow")
|
||||
(c-name "moo_window_get_name")
|
||||
(return-type "char*")
|
||||
)
|
||||
|
||||
(define-method get_id
|
||||
(of-object "MooWindow")
|
||||
(c-name "moo_window_get_id")
|
||||
(return-type "char*")
|
||||
)
|
||||
|
||||
|
||||
;; From ./moo/mooutils/moouixml.h
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ tree_selection_changed (GtkTreeSelection *selection,
|
|||
}
|
||||
|
||||
if (old_path)
|
||||
moo_tree_helper_update_model (helper, model, old_path);
|
||||
_moo_tree_helper_update_model (helper, model, old_path);
|
||||
|
||||
moo_tree_helper_real_update_widgets (helper, model, path);
|
||||
|
||||
|
@ -182,7 +182,7 @@ combo_changed (GtkComboBox *combo,
|
|||
}
|
||||
|
||||
if (old_path)
|
||||
moo_tree_helper_update_model (helper, model, old_path);
|
||||
_moo_tree_helper_update_model (helper, model, old_path);
|
||||
|
||||
moo_tree_helper_real_update_widgets (helper, model, path);
|
||||
|
||||
|
@ -394,7 +394,7 @@ _moo_tree_helper_class_init (MooTreeHelperClass *klass)
|
|||
|
||||
|
||||
void
|
||||
moo_tree_view_select_first (GtkTreeView *tree_view)
|
||||
_moo_tree_view_select_first (GtkTreeView *tree_view)
|
||||
{
|
||||
GtkTreeSelection *selection;
|
||||
GtkTreeModel *model;
|
||||
|
@ -411,7 +411,7 @@ moo_tree_view_select_first (GtkTreeView *tree_view)
|
|||
|
||||
|
||||
void
|
||||
moo_combo_box_select_first (GtkComboBox *combo)
|
||||
_moo_combo_box_select_first (GtkComboBox *combo)
|
||||
{
|
||||
GtkTreeModel *model;
|
||||
GtkTreeIter iter;
|
||||
|
@ -469,7 +469,7 @@ moo_tree_helper_real_update_widgets (MooTreeHelper *helper,
|
|||
|
||||
|
||||
void
|
||||
moo_tree_helper_update_model (MooTreeHelper *helper,
|
||||
_moo_tree_helper_update_model (MooTreeHelper *helper,
|
||||
GtkTreeModel *model,
|
||||
GtkTreePath *path)
|
||||
{
|
||||
|
@ -607,7 +607,7 @@ moo_tree_helper_delete_row (MooTreeHelper *helper)
|
|||
(gtk_tree_path_prev (path) && gtk_tree_model_get_iter (model, &iter, path))))
|
||||
gtk_tree_selection_select_iter (selection, &iter);
|
||||
else
|
||||
moo_tree_helper_update_widgets (helper);
|
||||
_moo_tree_helper_update_widgets (helper);
|
||||
|
||||
gtk_tree_path_free (path);
|
||||
}
|
||||
|
@ -734,7 +734,7 @@ moo_tree_helper_connect (MooTreeHelper *helper,
|
|||
|
||||
|
||||
MooTreeHelper *
|
||||
moo_tree_helper_new (GtkWidget *widget,
|
||||
_moo_tree_helper_new (GtkWidget *widget,
|
||||
GtkWidget *new_btn,
|
||||
GtkWidget *delete_btn,
|
||||
GtkWidget *up_btn,
|
||||
|
@ -754,7 +754,7 @@ moo_tree_helper_new (GtkWidget *widget,
|
|||
|
||||
|
||||
void
|
||||
moo_tree_helper_update_widgets (MooTreeHelper *helper)
|
||||
_moo_tree_helper_update_widgets (MooTreeHelper *helper)
|
||||
{
|
||||
GtkTreeModel *model;
|
||||
GtkTreeIter iter;
|
||||
|
@ -1054,7 +1054,7 @@ _moo_config_helper_init (MooConfigHelper *helper)
|
|||
|
||||
|
||||
MooConfigHelper *
|
||||
moo_config_helper_new (GtkWidget *tree_view,
|
||||
_moo_config_helper_new (GtkWidget *tree_view,
|
||||
GtkWidget *new_btn,
|
||||
GtkWidget *delete_btn,
|
||||
GtkWidget *up_btn,
|
||||
|
@ -1352,7 +1352,7 @@ moo_config_helper_add_widget_full (MooConfigHelper *helper,
|
|||
|
||||
|
||||
void
|
||||
moo_config_helper_add_widget (MooConfigHelper *helper,
|
||||
_moo_config_helper_add_widget (MooConfigHelper *helper,
|
||||
GtkWidget *widget,
|
||||
const char *key,
|
||||
gboolean update_live)
|
||||
|
@ -1366,10 +1366,10 @@ moo_config_helper_add_widget (MooConfigHelper *helper,
|
|||
|
||||
|
||||
void
|
||||
moo_config_helper_update_model (MooConfigHelper *helper,
|
||||
_moo_config_helper_update_model (MooConfigHelper *helper,
|
||||
GtkTreeModel *model,
|
||||
GtkTreePath *path)
|
||||
{
|
||||
g_return_if_fail (MOO_IS_CONFIG_HELPER (helper));
|
||||
moo_tree_helper_update_model (MOO_TREE_HELPER (helper), model, path);
|
||||
_moo_tree_helper_update_model (MOO_TREE_HELPER (helper), model, path);
|
||||
}
|
||||
|
|
|
@ -64,34 +64,33 @@ struct _MooConfigHelperClass {
|
|||
};
|
||||
|
||||
|
||||
MooTreeHelper *moo_tree_helper_new (GtkWidget *treeview_or_combo,
|
||||
MooTreeHelper *_moo_tree_helper_new (GtkWidget *treeview_or_combo,
|
||||
GtkWidget *new_btn,
|
||||
GtkWidget *delete_btn,
|
||||
GtkWidget *up_btn,
|
||||
GtkWidget *down_btn);
|
||||
void moo_tree_helper_update_model (MooTreeHelper *helper,
|
||||
void _moo_tree_helper_update_model (MooTreeHelper *helper,
|
||||
GtkTreeModel *model,
|
||||
GtkTreePath *path);
|
||||
void moo_tree_helper_update_widgets (MooTreeHelper *helper);
|
||||
void _moo_tree_helper_update_widgets (MooTreeHelper *helper);
|
||||
|
||||
MooConfigHelper *moo_config_helper_new (GtkWidget *tree_view,
|
||||
MooConfigHelper *_moo_config_helper_new (GtkWidget *tree_view,
|
||||
GtkWidget *new_btn,
|
||||
GtkWidget *delete_btn,
|
||||
GtkWidget *up_btn,
|
||||
GtkWidget *down_btn);
|
||||
|
||||
void moo_config_helper_add_widget (MooConfigHelper *helper,
|
||||
void _moo_config_helper_add_widget (MooConfigHelper *helper,
|
||||
GtkWidget *widget,
|
||||
const char *key,
|
||||
gboolean update_live);
|
||||
void moo_config_helper_update_model (MooConfigHelper *helper,
|
||||
void _moo_config_helper_update_model (MooConfigHelper *helper,
|
||||
GtkTreeModel *model,
|
||||
GtkTreePath *path);
|
||||
void moo_config_helper_update_widgets (MooConfigHelper *helper);
|
||||
|
||||
|
||||
void moo_tree_view_select_first (GtkTreeView *tree_view);
|
||||
void moo_combo_box_select_first (GtkComboBox *combo);
|
||||
void _moo_tree_view_select_first (GtkTreeView *tree_view);
|
||||
void _moo_combo_box_select_first (GtkComboBox *combo);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* mooui/moowindow.c
|
||||
* moowindow.c
|
||||
*
|
||||
* Copyright (C) 2004-2006 by Yevgen Muntyan <muntyan@math.tamu.edu>
|
||||
*
|
||||
|
@ -77,14 +77,19 @@ static void init_prefs (MooWindow *window);
|
|||
static GtkToolbarStyle get_toolbar_style (MooWindow *window);
|
||||
|
||||
|
||||
static void moo_window_class_init (MooWindowClass *klass);
|
||||
static const char *moo_window_class_get_id (MooWindowClass *klass);
|
||||
static const char *moo_window_class_get_name (MooWindowClass *klass);
|
||||
|
||||
static void moo_window_class_new_actionv (MooWindowClass *klass,
|
||||
const char *id,
|
||||
const char *group,
|
||||
const char *first_prop_name,
|
||||
va_list props);
|
||||
|
||||
GObject *moo_window_constructor (GType type,
|
||||
guint n_props,
|
||||
GObjectConstructParam *props);
|
||||
|
||||
static void moo_window_init (MooWindow *window);
|
||||
static void moo_window_dispose (GObject *object);
|
||||
|
||||
static void moo_window_set_property (GObject *object,
|
||||
guint prop_id,
|
||||
const GValue *value,
|
||||
|
@ -919,7 +924,7 @@ create_action (const char *action_id,
|
|||
}
|
||||
|
||||
|
||||
const char*
|
||||
static const char*
|
||||
moo_window_class_get_id (MooWindowClass *klass)
|
||||
{
|
||||
GType type;
|
||||
|
@ -931,7 +936,7 @@ moo_window_class_get_id (MooWindowClass *klass)
|
|||
}
|
||||
|
||||
|
||||
const char*
|
||||
static const char*
|
||||
moo_window_class_get_name (MooWindowClass *klass)
|
||||
{
|
||||
GType type;
|
||||
|
@ -1130,22 +1135,6 @@ moo_window_get_action (MooWindow *window,
|
|||
}
|
||||
|
||||
|
||||
char*
|
||||
moo_window_get_name (MooWindow *window)
|
||||
{
|
||||
g_return_val_if_fail (MOO_IS_WINDOW (window), NULL);
|
||||
return g_strdup (window->priv->name);
|
||||
}
|
||||
|
||||
|
||||
char*
|
||||
moo_window_get_id (MooWindow *window)
|
||||
{
|
||||
g_return_val_if_fail (MOO_IS_WINDOW (window), NULL);
|
||||
return g_strdup (window->priv->id);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
moo_window_set_id (MooWindow *window,
|
||||
const char *id)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* mooui/moowindow.h
|
||||
* moowindow.h
|
||||
*
|
||||
* Copyright (C) 2004-2006 by Yevgen Muntyan <muntyan@math.tamu.edu>
|
||||
*
|
||||
|
@ -67,8 +67,6 @@ gboolean moo_window_close (MooWindow *window);
|
|||
/* Actions
|
||||
*/
|
||||
|
||||
const char *moo_window_class_get_id (MooWindowClass *klass);
|
||||
const char *moo_window_class_get_name (MooWindowClass *klass);
|
||||
void moo_window_class_set_id (MooWindowClass *klass,
|
||||
const char *id,
|
||||
const char *name);
|
||||
|
@ -78,11 +76,6 @@ void moo_window_class_new_action (MooWindowClass *klass,
|
|||
const char *group,
|
||||
const char *first_prop_name,
|
||||
...) G_GNUC_NULL_TERMINATED;
|
||||
void moo_window_class_new_actionv (MooWindowClass *klass,
|
||||
const char *id,
|
||||
const char *group,
|
||||
const char *first_prop_name,
|
||||
va_list props);
|
||||
void moo_window_class_new_action_custom (MooWindowClass *klass,
|
||||
const char *id,
|
||||
const char *group,
|
||||
|
@ -111,9 +104,6 @@ MooActionCollection *moo_window_get_actions (MooWindow *window);
|
|||
GtkAction *moo_window_get_action (MooWindow *window,
|
||||
const char *action);
|
||||
|
||||
char *moo_window_get_name (MooWindow *window);
|
||||
char *moo_window_get_id (MooWindow *window);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
Loading…
Reference in New Issue