-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
-
/*
- * (GLABELS) Label and Business Card Creation program for GNOME
- *
- * ui.c: GLabels ui module
+ * ui.c
+ * Copyright (C) 2001-2009 Jim Evins <evins@snaught.com>.
*
- * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>.
+ * This file is part of gLabels.
*
- * This program is free software; you can redistribute it and/or modify
+ * gLabels is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
+ * gLabels is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with gLabels. If not, see <http://www.gnu.org/licenses/>.
*/
+
#include <config.h>
#include "ui.h"
#include <glib/gi18n.h>
#include <gconf/gconf-client.h>
-#include <gtk/gtkrecentchoosermenu.h>
-#include <gtk/gtkmenuitem.h>
-#include <gtk/gtkstock.h>
-#include <gtk/gtktoolbar.h>
-#include <gtk/gtkstatusbar.h>
+#include <gtk/gtk.h>
#include <string.h>
#include "ui-util.h"
#include "debug.h"
+
/*==========================================================================*/
/* Private macros and constants. */
/*==========================================================================*/
+
/*==========================================================================*/
/* Private types. */
/*==========================================================================*/
G_CALLBACK (gl_ui_cmd_view_property_bar_toggle),
TRUE },
- { "ViewPropertyToolBarToolTips",
- NULL,
- N_("Show tooltips"),
- NULL,
- N_("Show tooltips for property toolbar"),
- G_CALLBACK (gl_ui_cmd_view_property_bar_tips_toggle),
- TRUE },
-
{ "ViewGrid",
NULL,
N_("Grid"),
G_CALLBACK (view_ui_item_toggled_cb),
TRUE },
- { "ViewMainToolBarToolTips",
- NULL,
- N_("Show tooltips"),
- NULL,
- N_("Show tooltips for main toolbar"),
- G_CALLBACK (view_ui_item_toggled_cb),
- TRUE },
-
- { "ViewDrawingToolBarToolTips",
- NULL,
- N_("Show tooltips"),
- NULL,
- N_("Show tooltips for drawing toolbar"),
- G_CALLBACK (view_ui_item_toggled_cb),
- TRUE },
-
};
static guint n_ui_toggle_entries = G_N_ELEMENTS (ui_toggle_entries);
" <menuitem action='ViewDrawingToolBar' />"
" <menuitem action='ViewPropertyToolBar' />"
" <separator />"
-" <menu action='ViewMainToolBarMenu'>"
-" <menuitem action='ViewMainToolBarToolTips' />"
-" </menu>"
-" <menu action='ViewDrawingToolBarMenu'>"
-" <menuitem action='ViewDrawingToolBarToolTips' />"
-" </menu>"
-" <menu action='ViewPropertyToolBarMenu'>"
-" <menuitem action='ViewPropertyToolBarToolTips' />"
-" </menu>"
-" <separator />"
" <menuitem action='ViewGrid' />"
" <menuitem action='ViewMarkup' />"
" <separator />"
};
static gchar* doc_modified_verbs [] = {
- "/ui/MenuBar/FileMenu/Save",
+ "/ui/MenuBar/FileMenu/FileSave",
NULL
};
G_CALLBACK (disconnect_proxy_cb), window);
actions = gtk_action_group_new ("Actions");
+ gtk_action_group_set_translation_domain (actions, NULL);
gtk_action_group_add_actions (actions, entries, n_entries, GTK_WINDOW (window));
gtk_action_group_add_toggle_actions (actions,
toggle_entries, n_toggle_entries,
return ui;
}
+
/*****************************************************************************/
/** Unref wrapper. */
/*****************************************************************************/
gl_debug (DEBUG_UI, "END");
}
+
/*****************************************************************************/
/** Update all verbs of given UI component. */
/*****************************************************************************/
gl_debug (DEBUG_UI, "END");
}
+
/*****************************************************************************/
/** Update all verbs of given UI component to "no document" state. */
/*****************************************************************************/
gl_debug (DEBUG_UI, "END");
}
+
/*****************************************************************************/
/** Update label modified verbs of given UI component. */
/*****************************************************************************/
gl_debug (DEBUG_UI, "END");
}
+
/*****************************************************************************/
/** Update verbs associated with selection state of given UI component. */
/*****************************************************************************/
gl_debug (DEBUG_UI, "END");
}
+
/*****************************************************************************/
/** Update verbs associated with zoom level of given UI component. */
/*****************************************************************************/
gl_debug (DEBUG_UI, "END");
}
+
/*****************************************************************************/
/** Update undo/redo verbs of given UI component. */
/*****************************************************************************/
gl_debug (DEBUG_UI, "END");
}
+
/*---------------------------------------------------------------------------*/
/** PRIVATE. View menu item toggled callback. */
/*---------------------------------------------------------------------------*/
gl_prefs_model_save_settings (gl_prefs);
}
- if (strcmp (name, "ViewMainToolBarToolTips") == 0)
- {
- gl_prefs->main_toolbar_view_tooltips = state;
- set_app_main_toolbar_style (ui);
- gl_prefs_model_save_settings (gl_prefs);
- }
-
if (strcmp (name, "ViewDrawingToolBar") == 0)
{
gl_prefs->drawing_toolbar_visible = state;
gl_prefs_model_save_settings (gl_prefs);
}
- if (strcmp (name, "ViewDrawingToolBarToolTips") == 0)
- {
- gl_prefs->drawing_toolbar_view_tooltips = state;
- set_app_drawing_toolbar_style (ui);
- gl_prefs_model_save_settings (gl_prefs);
- }
-
gl_debug (DEBUG_UI, "");
}
+
/*---------------------------------------------------------------------------*/
/** PRIVATE. Set main toolbar style. */
/*---------------------------------------------------------------------------*/
gl_ui_util_set_verb_state (ui, "/ui/ViewMenu/ViewMainToolBar",
gl_prefs->main_toolbar_visible);
- gl_ui_util_set_verb_sensitive (ui, "/ui/ViewMenu/ViewMainToolBarToolTips",
- gl_prefs->main_toolbar_visible);
-
- gl_ui_util_set_verb_state (ui, "/ui/ViewMenu/ViewMainToolBarToolTips",
- gl_prefs->main_toolbar_view_tooltips);
-
-
toolbar = gtk_ui_manager_get_widget (ui, "/MainToolBar");
- gtk_toolbar_set_tooltips (GTK_TOOLBAR (toolbar),
- gl_prefs->main_toolbar_view_tooltips);
-
if (gl_prefs->main_toolbar_visible) {
gtk_widget_show_all (toolbar);
} else {
gl_ui_util_set_verb_state (ui, "/ui/MenuBar/ViewMenu/ViewDrawingToolBar",
gl_prefs->drawing_toolbar_visible);
- gl_ui_util_set_verb_sensitive (ui, "/ui/MenuBar/ViewMenu/ViewDrawingToolBarToolTips",
- gl_prefs->drawing_toolbar_visible);
-
- gl_ui_util_set_verb_state (ui, "/ui/MenuBar/ViewMenuDrawingToolBarToolTips",
- gl_prefs->drawing_toolbar_view_tooltips);
-
-
toolbar = gtk_ui_manager_get_widget (ui, "/DrawingToolBar");
- gtk_toolbar_set_tooltips (GTK_TOOLBAR (toolbar),
- gl_prefs->drawing_toolbar_view_tooltips);
-
gtk_toolbar_set_style (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_ICONS);
if (gl_prefs->drawing_toolbar_visible) {
gl_debug (DEBUG_UI, "END");
}
+
/*---------------------------------------------------------------------------*/
/** PRIVATE. Set visibility of grid and markup. */
/*---------------------------------------------------------------------------*/
gl_debug (DEBUG_UI, "END");
}
+
/*---------------------------------------------------------------------------*/
/** PRIVATE. Connect proxy callback. */
/*---------------------------------------------------------------------------*/
}
}
+
/*---------------------------------------------------------------------------*/
/** PRIVATE. Disconnect proxy callback. */
/*---------------------------------------------------------------------------*/
}
}
+
/*---------------------------------------------------------------------------*/
/** PRIVATE. Menu item select callback. */
/*---------------------------------------------------------------------------*/
}
}
+
/*---------------------------------------------------------------------------*/
/** PRIVATE. Menu item deselect callback. */
/*---------------------------------------------------------------------------*/
window->menu_tips_context_id);
}
+
+
+/*
+ * Local Variables: -- emacs
+ * mode: C -- emacs
+ * c-basic-offset: 8 -- emacs
+ * tab-width: 8 -- emacs
+ * indent-tabs-mode: nil -- emacs
+ * End: -- emacs
+ */