context-menu.cpp revision 3107dd9d5648e6723214a608f99fa484094c3917
#define __CONTEXT_MENU_C__
/*
* Unser-interface related object extension
*
* Authors:
* Lauris Kaplinski <lauris@kaplinski.com>
*
* This code is in public domain
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "context-menu.h"
#include "desktop.h"
#include "document.h"
#include "message-stack.h"
#include "preferences.h"
#include "ui/dialog/dialog-manager.h"
/* Append object-specific part to context menu */
void
{
}
}
/* Implementation */
#include <gtk/gtkmenuitem.h>
#include "sp-anchor.h"
#include "sp-image.h"
#include "sp-text.h"
#include "document.h"
#include "desktop-handles.h"
#include "selection.h"
#include "selection-chemistry.h"
#include "dialogs/item-properties.h"
#include "dialogs/object-attributes.h"
#include "dialogs/text-edit.h"
#include "dialogs/spellcheck.h"
#include "sp-path.h"
#include "sp-clippath.h"
#include "sp-mask.h"
static void
{
if (!t2m) {
}
handler = (void (*)(SPObject*, SPDesktop*, GtkMenu*))g_hash_table_lookup(t2m, GUINT_TO_POINTER(type));
}
/* SPItem */
/* Generate context menu item section */
static void
{
GtkWidget *w;
/* Item dialog */
w = gtk_menu_item_new_with_mnemonic(_("_Object Properties..."));
gtk_widget_show(w);
gtk_menu_append(GTK_MENU(m), w);
/* Separator */
w = gtk_menu_item_new();
gtk_widget_show(w);
gtk_menu_append(GTK_MENU(m), w);
/* Select item */
w = gtk_menu_item_new_with_mnemonic(_("_Select This"));
} else {
}
gtk_widget_show(w);
gtk_menu_append(GTK_MENU(m), w);
/* Create link */
w = gtk_menu_item_new_with_mnemonic(_("_Create Link"));
gtk_widget_show(w);
gtk_menu_append(GTK_MENU(m), w);
/* Set mask */
w = gtk_menu_item_new_with_mnemonic(_("Set Mask"));
if ((item && item->mask_ref && item->mask_ref->getObject()) || (item->clip_ref && item->clip_ref->getObject())) {
} else {
}
gtk_widget_show(w);
gtk_menu_append(GTK_MENU(m), w);
/* Release mask */
w = gtk_menu_item_new_with_mnemonic(_("Release Mask"));
} else {
}
gtk_widget_show(w);
gtk_menu_append(GTK_MENU(m), w);
/* Set Clip */
w = gtk_menu_item_new_with_mnemonic(_("Set _Clip"));
if ((item && item->mask_ref && item->mask_ref->getObject()) || (item->clip_ref && item->clip_ref->getObject())) {
} else {
}
gtk_widget_show(w);
gtk_menu_append(GTK_MENU(m), w);
/* Release Clip */
w = gtk_menu_item_new_with_mnemonic(_("Release C_lip"));
} else {
}
gtk_widget_show(w);
gtk_menu_append(GTK_MENU(m), w);
}
static void
{
}
static void
{
sp_selection_set_mask(desktop, false, false);
}
static void
{
sp_selection_unset_mask(desktop, false);
}
static void
{
sp_selection_set_mask(desktop, true, false);
}
static void
{
sp_selection_unset_mask(desktop, true);
}
static void
{
}
static void
{
_("Create link"));
}
/* SPGroup */
static void
{
GtkWidget *w;
/* "Ungroup" */
w = gtk_menu_item_new_with_mnemonic(_("_Ungroup"));
gtk_signal_connect(GTK_OBJECT(w), "activate", GTK_SIGNAL_FUNC(sp_item_group_ungroup_activate), item);
gtk_widget_show(w);
}
static void
{
}
/* SPAnchor */
static void
{
GtkWidget *w;
/* Link dialog */
w = gtk_menu_item_new_with_mnemonic(_("Link _Properties..."));
gtk_widget_show(w);
gtk_menu_append(GTK_MENU(m), w);
/* Select item */
w = gtk_menu_item_new_with_mnemonic(_("_Follow Link"));
gtk_widget_show(w);
gtk_menu_append(GTK_MENU(m), w);
/* Reset transformations */
w = gtk_menu_item_new_with_mnemonic(_("_Remove Link"));
gtk_widget_show(w);
gtk_menu_append(GTK_MENU(m), w);
}
static void
{
}
static void
{
/* shell out to an external browser here */
}
static void
{
}
/* Image */
static void
{
GtkWidget *w;
/* Link dialog */
w = gtk_menu_item_new_with_mnemonic(_("Image _Properties..."));
gtk_widget_show(w);
gtk_menu_append(GTK_MENU(m), w);
w = gtk_menu_item_new_with_mnemonic(_("Edit Externally..."));
gtk_widget_show(w);
gtk_menu_append(GTK_MENU(m), w);
gtk_widget_set_sensitive( w, FALSE );
}
}
static void
{
}
static gchar* getImageEditorName() {
}
if (!value) {
}
return value;
}
{
g_spawn_async(0, // working dir
0, //envp
0, // child_setup
0, // user_data
0, //GPid *child_pid
&errThing);
if ( errThing ) {
errThing = 0;
}
}
/* Fill and Stroke entry */
static void
{
}
}
/* SPShape */
static void
{
GtkWidget *w;
/* Item dialog */
w = gtk_menu_item_new_with_mnemonic(_("_Fill and Stroke..."));
gtk_widget_show(w);
gtk_menu_append(GTK_MENU(m), w);
}
/* Edit Text entry */
static void
{
}
}
/* Spellcheck entry */
static void
{
}
}
/* SPText */
static void
{
GtkWidget *w;
/* Fill and Stroke dialog */
w = gtk_menu_item_new_with_mnemonic(_("_Fill and Stroke..."));
gtk_widget_show(w);
gtk_menu_append(GTK_MENU(m), w);
/* Edit Text dialog */
w = gtk_menu_item_new_with_mnemonic(_("_Text and Font..."));
gtk_widget_show(w);
gtk_menu_append(GTK_MENU(m), w);
/* Spellcheck dialog */
w = gtk_menu_item_new_with_mnemonic(_("Check Spellin_g..."));
gtk_widget_show(w);
gtk_menu_append(GTK_MENU(m), w);
}
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :