• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

作図ソフト dia の改良版


Commit MetaInfo

修訂0d9ca9c09f83510e644a00223082f8cc55f2adf5 (tree)
時間2014-09-06 02:44:33
作者Hans Breuer <hans@breu...>
CommiterHans Breuer

Log Message

layer-widget: Add edit name button to button row

This makes the layer list slightly wider, so it is loosing it's
scroll-bar for most diagrams I looked at.

Change Summary

差異

--- a/app/layer_dialog.c
+++ b/app/layer_dialog.c
@@ -156,6 +156,7 @@ static void dia_layer_set_layer(DiaLayerWidget *widget, Diagram *dia, Layer *lay
156156 static void dia_layer_update_from_layer(DiaLayerWidget *widget);
157157
158158 static void layer_dialog_new_callback(GtkWidget *widget, gpointer gdata);
159+static void layer_dialog_rename_callback(GtkWidget *widget, gpointer gdata);
159160 static void layer_dialog_raise_callback(GtkWidget *widget, gpointer gdata);
160161 static void layer_dialog_lower_callback(GtkWidget *widget, gpointer gdata);
161162 static void layer_dialog_delete_callback(GtkWidget *widget, gpointer gdata);
@@ -163,6 +164,7 @@ static void layer_dialog_edit_layer(DiaLayerWidget *layer_widget, Diagram *dia,
163164
164165 static ButtonData buttons[] = {
165166 { GTK_STOCK_ADD, layer_dialog_new_callback, N_("New Layer") },
167+ { GTK_STOCK_EDIT, layer_dialog_rename_callback, N_("Rename Layer") },
166168 { GTK_STOCK_GO_UP, layer_dialog_raise_callback, N_("Raise Layer") },
167169 { GTK_STOCK_GO_DOWN, layer_dialog_lower_callback, N_("Lower Layer") },
168170 { GTK_STOCK_DELETE, layer_dialog_delete_callback, N_("Delete Layer") },
@@ -537,6 +539,18 @@ layer_dialog_new_callback(GtkWidget *widget, gpointer gdata)
537539 }
538540
539541 static void
542+layer_dialog_rename_callback(GtkWidget *widget, gpointer gdata)
543+{
544+ GtkWidget *selected;
545+ Diagram *dia;
546+ Layer *layer;
547+ dia = layer_dialog->diagram;
548+ selected = GTK_LIST(layer_dialog->layer_list)->selection->data;
549+ layer = dia->data->active_layer;
550+ layer_dialog_edit_layer (DIA_LAYER_WIDGET (selected), dia, layer);
551+}
552+
553+static void
540554 layer_dialog_delete_callback(GtkWidget *widget, gpointer gdata)
541555 {
542556 Diagram *dia;
@@ -823,7 +837,7 @@ layer_dialog_set_diagram(Diagram *dia)
823837 /******* DiaLayerWidget: *****/
824838
825839 /* The connectability buttons don't quite behave the way they should.
826- * The shift-click behaviour messes up the active layer.
840+ * The shift-click behavior messes up the active layer.
827841 * To fix this, we need to rework the code so that the setting of
828842 * connect_on and connect_off is not tied to the button toggling,
829843 * but determined by what caused it (creation, user selection,