summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d5a0ad1)
raw | patch | inline | side by side (parent: d5a0ad1)
author | pjrm <pjrm@users.sourceforge.net> | |
Mon, 10 Mar 2008 10:10:32 +0000 (10:10 +0000) | ||
committer | pjrm <pjrm@users.sourceforge.net> | |
Mon, 10 Mar 2008 10:10:32 +0000 (10:10 +0000) |
src/dialogs/stroke-style.cpp | patch | blob | history |
index 903b7ea4769239ebe5ce2a4d3fd1ca0cce42078c..70cb84a7e9be63d16140ded25b79bf4a1c3e7760 100644 (file)
sp_stroke_style_paint_changed(psel, spw);
}
-static gchar *undo_label_1 = "stroke:flatcolor:1";
-static gchar *undo_label_2 = "stroke:flatcolor:2";
-static gchar *undo_label = undo_label_1;
+static gchar const *const undo_label_1 = "stroke:flatcolor:1";
+static gchar const *const undo_label_2 = "stroke:flatcolor:2";
+static gchar const *undo_label = undo_label_1;
/**
* When a drag callback occurs on a paint selector object, if it is a RGB or CMYK
@@ -580,7 +580,7 @@ sp_stroke_style_widget_transientize_callback(Inkscape::Application */*inkscape*/
static GtkWidget *
sp_marker_prev_new(unsigned psize, gchar const *mname,
SPDocument *source, SPDocument *sandbox,
- gchar *menu_id, NRArena const */*arena*/, unsigned /*visionkey*/, NRArenaItem *root)
+ gchar const *menu_id, NRArena const */*arena*/, unsigned /*visionkey*/, NRArenaItem *root)
{
// Retrieve the marker named 'mname' from the source SVG document
SPObject const *marker = source->getObjectById(mname);
* Adds previews of markers in marker_list to the given menu widget
*/
static void
-sp_marker_menu_build (GtkWidget *m, GSList *marker_list, SPDocument *source, SPDocument *sandbox, gchar *menu_id)
+sp_marker_menu_build (GtkWidget *m, GSList *marker_list, SPDocument *source, SPDocument *sandbox, gchar const *menu_id)
{
// Do this here, outside of loop, to speed up preview generation:
NRArena const *arena = NRArena::create();
@@ -722,7 +722,7 @@ sp_marker_menu_build (GtkWidget *m, GSList *marker_list, SPDocument *source, SPD
*
*/
static void
-sp_marker_list_from_doc (GtkWidget *m, SPDocument */*current_doc*/, SPDocument *source, SPDocument */*markers_doc*/, SPDocument *sandbox, gchar *menu_id)
+sp_marker_list_from_doc (GtkWidget *m, SPDocument */*current_doc*/, SPDocument *source, SPDocument */*markers_doc*/, SPDocument *sandbox, gchar const *menu_id)
{
GSList *ml = ink_marker_list_get(source);
GSList *clean_ml = NULL;
@@ -777,7 +777,7 @@ gchar const *buffer = "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:sodipodi=
}
static void
-ink_marker_menu_create_menu(GtkWidget *m, gchar *menu_id, SPDocument *doc, SPDocument *sandbox)
+ink_marker_menu_create_menu(GtkWidget *m, gchar const *menu_id, SPDocument *doc, SPDocument *sandbox)
{
static SPDocument *markers_doc = NULL;
@@ -832,7 +832,7 @@ ink_marker_menu_create_menu(GtkWidget *m, gchar *menu_id, SPDocument *doc, SPDoc
* Creates a menu widget to display markers from markers.svg
*/
static GtkWidget *
-ink_marker_menu( GtkWidget */*tbl*/, gchar *menu_id, SPDocument *sandbox)
+ink_marker_menu( GtkWidget */*tbl*/, gchar const *menu_id, SPDocument *sandbox)
{
SPDesktop *desktop = inkscape_active_desktop();
SPDocument *doc = sp_desktop_document(desktop);
gtk_widget_set_sensitive(mnu, TRUE);
}
- gtk_object_set_data(GTK_OBJECT(mnu), "menu_id", menu_id);
+ gtk_object_set_data(GTK_OBJECT(mnu), "menu_id", const_cast<gchar *>(menu_id));
gtk_option_menu_set_menu(GTK_OPTION_MENU(mnu), m);
/* Set history */
}
gchar *markid = (gchar *) g_object_get_data(G_OBJECT(gtk_menu_get_active(GTK_MENU(gtk_option_menu_get_menu(mnu)))),
"marker");
- gchar *marker = "";
+ gchar const *marker = "";
if (strcmp(markid, "none")){
gchar *stockid = (gchar *) g_object_get_data(G_OBJECT(gtk_menu_get_active(GTK_MENU(gtk_option_menu_get_menu(mnu)))),
"stockid");
}
SPCSSAttr *css = sp_repr_css_attr_new();
- gchar *menu_id = (gchar *) g_object_get_data(G_OBJECT(mnu), "menu_id");
+ gchar const *menu_id = (gchar const *) g_object_get_data(G_OBJECT(mnu), "menu_id");
sp_repr_css_set_property(css, menu_id, marker);
// Also update the marker dropdown menus, so the document's markers
};
static int
-ink_marker_menu_get_pos(GtkMenu* mnu, gchar* markname) {
-
+ink_marker_menu_get_pos(GtkMenu *mnu, gchar const *markname)
+{
if (markname == NULL)
- markname = (gchar *) g_object_get_data(G_OBJECT(gtk_menu_get_active(mnu)), "marker");
+ markname = (gchar const *) g_object_get_data(G_OBJECT(gtk_menu_get_active(mnu)), "marker");
if (markname == NULL)
return 0;
- GList *kids = GTK_MENU_SHELL(mnu)->children;
+ GList const *kids = GTK_MENU_SHELL(mnu)->children;
int i = 0;
for (; kids != NULL; kids = kids->next) {
- gchar *mark = (gchar *) g_object_get_data(G_OBJECT(kids->data), "marker");
+ gchar const *mark = (gchar const *) g_object_get_data(G_OBJECT(kids->data), "marker");
if ( mark && strcmp(mark, markname) == 0 ) {
break;
}