Browse Source

ThePimp: add tooltips and ellipses here and there in the GUI.

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2950 92316355-f0b4-4df1-b90c-862c8a59935f
remotes/tiles
sam 16 years ago
parent
commit
095896c549
3 changed files with 22 additions and 16 deletions
  1. +10
    -10
      ThePimp/gtk-gui/ThePimp.MainWindow.cs
  2. +1
    -1
      ThePimp/gtk-gui/ThePimp.SaveFile.cs
  3. +11
    -5
      ThePimp/gtk-gui/gui.stetic

+ 10
- 10
ThePimp/gtk-gui/ThePimp.MainWindow.cs View File

@@ -92,11 +92,11 @@ namespace ThePimp {
// Widget ThePimp.MainWindow // Widget ThePimp.MainWindow
Gtk.UIManager w1 = new Gtk.UIManager(); Gtk.UIManager w1 = new Gtk.UIManager();
Gtk.ActionGroup w2 = new Gtk.ActionGroup("Default"); Gtk.ActionGroup w2 = new Gtk.ActionGroup("Default");
this.newAction = new Gtk.Action("newAction", null, null, "gtk-new");
this.newAction = new Gtk.Action("newAction", null, Mono.Unix.Catalog.GetString("Create a new image"), "gtk-new");
w2.Add(this.newAction, null); w2.Add(this.newAction, null);
this.openAction = new Gtk.Action("openAction", null, null, "gtk-open");
this.openAction = new Gtk.Action("openAction", null, Mono.Unix.Catalog.GetString("Open an image"), "gtk-open");
w2.Add(this.openAction, null); w2.Add(this.openAction, null);
this.saveAction = new Gtk.Action("saveAction", null, null, "gtk-save");
this.saveAction = new Gtk.Action("saveAction", null, Mono.Unix.Catalog.GetString("Save active image"), "gtk-save");
this.saveAction.Sensitive = false; this.saveAction.Sensitive = false;
w2.Add(this.saveAction, null); w2.Add(this.saveAction, null);
this.FileAction = new Gtk.Action("FileAction", Mono.Unix.Catalog.GetString("File"), null, null); this.FileAction = new Gtk.Action("FileAction", Mono.Unix.Catalog.GetString("File"), null, null);
@@ -111,17 +111,17 @@ namespace ThePimp {
this.HelpAction = new Gtk.Action("HelpAction", Mono.Unix.Catalog.GetString("Help"), null, null); this.HelpAction = new Gtk.Action("HelpAction", Mono.Unix.Catalog.GetString("Help"), null, null);
this.HelpAction.ShortLabel = Mono.Unix.Catalog.GetString("Help"); this.HelpAction.ShortLabel = Mono.Unix.Catalog.GetString("Help");
w2.Add(this.HelpAction, null); w2.Add(this.HelpAction, null);
this.NewAction = new Gtk.Action("NewAction", Mono.Unix.Catalog.GetString("_New"), null, "gtk-new");
this.NewAction = new Gtk.Action("NewAction", Mono.Unix.Catalog.GetString("_New..."), null, "gtk-new");
this.NewAction.ShortLabel = Mono.Unix.Catalog.GetString("_New"); this.NewAction.ShortLabel = Mono.Unix.Catalog.GetString("_New");
w2.Add(this.NewAction, null); w2.Add(this.NewAction, null);
this.OpenAction = new Gtk.Action("OpenAction", Mono.Unix.Catalog.GetString("_Open"), null, "gtk-open");
this.OpenAction = new Gtk.Action("OpenAction", Mono.Unix.Catalog.GetString("_Open..."), null, "gtk-open");
this.OpenAction.ShortLabel = Mono.Unix.Catalog.GetString("_Open"); this.OpenAction.ShortLabel = Mono.Unix.Catalog.GetString("_Open");
w2.Add(this.OpenAction, null); w2.Add(this.OpenAction, null);
this.SaveAction = new Gtk.Action("SaveAction", Mono.Unix.Catalog.GetString("_Save"), null, "gtk-save"); this.SaveAction = new Gtk.Action("SaveAction", Mono.Unix.Catalog.GetString("_Save"), null, "gtk-save");
this.SaveAction.Sensitive = false; this.SaveAction.Sensitive = false;
this.SaveAction.ShortLabel = Mono.Unix.Catalog.GetString("_Save"); this.SaveAction.ShortLabel = Mono.Unix.Catalog.GetString("_Save");
w2.Add(this.SaveAction, null); w2.Add(this.SaveAction, null);
this.SaveAsAction = new Gtk.Action("SaveAsAction", Mono.Unix.Catalog.GetString("Save _As"), null, "gtk-save-as");
this.SaveAsAction = new Gtk.Action("SaveAsAction", Mono.Unix.Catalog.GetString("Save _As..."), null, "gtk-save-as");
this.SaveAsAction.ShortLabel = Mono.Unix.Catalog.GetString("Save _As"); this.SaveAsAction.ShortLabel = Mono.Unix.Catalog.GetString("Save _As");
w2.Add(this.SaveAsAction, null); w2.Add(this.SaveAsAction, null);
this.QuitAction = new Gtk.Action("QuitAction", Mono.Unix.Catalog.GetString("_Quit"), null, "gtk-quit"); this.QuitAction = new Gtk.Action("QuitAction", Mono.Unix.Catalog.GetString("_Quit"), null, "gtk-quit");
@@ -158,10 +158,10 @@ namespace ThePimp {
this.ZoomInAction.Sensitive = false; this.ZoomInAction.Sensitive = false;
this.ZoomInAction.ShortLabel = Mono.Unix.Catalog.GetString("Zoom _In"); this.ZoomInAction.ShortLabel = Mono.Unix.Catalog.GetString("Zoom _In");
w2.Add(this.ZoomInAction, null); w2.Add(this.ZoomInAction, null);
this.undoAction = new Gtk.Action("undoAction", null, null, "gtk-undo");
this.undoAction = new Gtk.Action("undoAction", null, Mono.Unix.Catalog.GetString("Undo action"), "gtk-undo");
this.undoAction.Sensitive = false; this.undoAction.Sensitive = false;
w2.Add(this.undoAction, null); w2.Add(this.undoAction, null);
this.redoAction = new Gtk.Action("redoAction", null, null, "gtk-redo");
this.redoAction = new Gtk.Action("redoAction", null, Mono.Unix.Catalog.GetString("Redo action"), "gtk-redo");
this.redoAction.Sensitive = false; this.redoAction.Sensitive = false;
w2.Add(this.redoAction, null); w2.Add(this.redoAction, null);
this.zoom100Action = new Gtk.Action("zoom100Action", null, null, "gtk-zoom-100"); this.zoom100Action = new Gtk.Action("zoom100Action", null, null, "gtk-zoom-100");
@@ -179,7 +179,7 @@ namespace ThePimp {
this.helpAction = new Gtk.Action("helpAction", null, null, "gtk-help"); this.helpAction = new Gtk.Action("helpAction", null, null, "gtk-help");
this.helpAction.Sensitive = false; this.helpAction.Sensitive = false;
w2.Add(this.helpAction, null); w2.Add(this.helpAction, null);
this.saveAsAction = new Gtk.Action("saveAsAction", null, null, "gtk-save-as");
this.saveAsAction = new Gtk.Action("saveAsAction", null, Mono.Unix.Catalog.GetString("Save active image "), "gtk-save-as");
w2.Add(this.saveAsAction, null); w2.Add(this.saveAsAction, null);
w1.InsertActionGroup(w2, 0); w1.InsertActionGroup(w2, 0);
this.AddAccelGroup(w1.AccelGroup); this.AddAccelGroup(w1.AccelGroup);
@@ -200,7 +200,7 @@ namespace ThePimp {
w3.Expand = false; w3.Expand = false;
w3.Fill = false; w3.Fill = false;
// Container child vbox1.Gtk.Box+BoxChild // Container child vbox1.Gtk.Box+BoxChild
w1.AddUiFromString("<ui><toolbar name='toolbar1'><toolitem action='newAction'/><toolitem action='openAction'/><toolitem action='saveAction'/><toolitem action='saveAsAction'/><separator/><toolitem action='undoAction'/><toolitem action='redoAction'/><separator/><toolitem action='zoomInAction'/><toolitem action='zoomOutAction'/><toolitem action='zoomFitAction'/><toolitem action='zoom100Action'/><separator/><toolitem action='helpAction'/></toolbar></ui>");
w1.AddUiFromString("<ui><toolbar name='toolbar1'><toolitem action='newAction'/><toolitem action='openAction'/><toolitem action='saveAction'/><separator/><toolitem action='undoAction'/><toolitem action='redoAction'/><separator/><toolitem action='zoomInAction'/><toolitem action='zoomOutAction'/><toolitem action='zoomFitAction'/><toolitem action='zoom100Action'/><separator/><toolitem action='helpAction'/></toolbar></ui>");
this.toolbar1 = ((Gtk.Toolbar)(w1.GetWidget("/toolbar1"))); this.toolbar1 = ((Gtk.Toolbar)(w1.GetWidget("/toolbar1")));
this.toolbar1.Name = "toolbar1"; this.toolbar1.Name = "toolbar1";
this.toolbar1.ShowArrow = false; this.toolbar1.ShowArrow = false;


+ 1
- 1
ThePimp/gtk-gui/ThePimp.SaveFile.cs View File

@@ -32,7 +32,7 @@ namespace ThePimp {
w1.Name = "dialog1_VBox"; w1.Name = "dialog1_VBox";
w1.BorderWidth = ((uint)(2)); w1.BorderWidth = ((uint)(2));
// Container child dialog1_VBox.Gtk.Box+BoxChild // Container child dialog1_VBox.Gtk.Box+BoxChild
this.filechooserwidget1 = new Gtk.FileChooserWidget(((Gtk.FileChooserAction)(0)));
this.filechooserwidget1 = new Gtk.FileChooserWidget(((Gtk.FileChooserAction)(1)));
this.filechooserwidget1.Name = "filechooserwidget1"; this.filechooserwidget1.Name = "filechooserwidget1";
w1.Add(this.filechooserwidget1); w1.Add(this.filechooserwidget1);
Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(w1[this.filechooserwidget1])); Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(w1[this.filechooserwidget1]));


+ 11
- 5
ThePimp/gtk-gui/gui.stetic View File

@@ -2,7 +2,7 @@
<stetic-interface> <stetic-interface>
<configuration> <configuration>
<images-root-path>..</images-root-path> <images-root-path>..</images-root-path>
<target-gtk-version>2.10.3</target-gtk-version>
<target-gtk-version>2.12.1</target-gtk-version>
</configuration> </configuration>
<import> <import>
<widget-library name="../ThePimp.exe" internal="true" /> <widget-library name="../ThePimp.exe" internal="true" />
@@ -13,12 +13,14 @@
<property name="Type">Action</property> <property name="Type">Action</property>
<property name="Label" translatable="yes" /> <property name="Label" translatable="yes" />
<property name="StockId">gtk-new</property> <property name="StockId">gtk-new</property>
<property name="Tooltip" translatable="yes">Create a new image</property>
<signal name="Activated" handler="OnNewActionActivated" /> <signal name="Activated" handler="OnNewActionActivated" />
</action> </action>
<action id="openAction"> <action id="openAction">
<property name="Type">Action</property> <property name="Type">Action</property>
<property name="Label" translatable="yes" /> <property name="Label" translatable="yes" />
<property name="StockId">gtk-open</property> <property name="StockId">gtk-open</property>
<property name="Tooltip" translatable="yes">Open an image</property>
<signal name="Activated" handler="OnOpenActionActivated" /> <signal name="Activated" handler="OnOpenActionActivated" />
</action> </action>
<action id="saveAction"> <action id="saveAction">
@@ -26,6 +28,7 @@
<property name="Label" translatable="yes" /> <property name="Label" translatable="yes" />
<property name="Sensitive">False</property> <property name="Sensitive">False</property>
<property name="StockId">gtk-save</property> <property name="StockId">gtk-save</property>
<property name="Tooltip" translatable="yes">Save active image</property>
<signal name="Activated" handler="OnSaveActionActivated" /> <signal name="Activated" handler="OnSaveActionActivated" />
</action> </action>
<action id="FileAction"> <action id="FileAction">
@@ -50,14 +53,14 @@
</action> </action>
<action id="NewAction"> <action id="NewAction">
<property name="Type">Action</property> <property name="Type">Action</property>
<property name="Label" translatable="yes">_New</property>
<property name="Label" translatable="yes">_New...</property>
<property name="ShortLabel" translatable="yes">_New</property> <property name="ShortLabel" translatable="yes">_New</property>
<property name="StockId">gtk-new</property> <property name="StockId">gtk-new</property>
<signal name="Activated" handler="OnNewActionActivated" /> <signal name="Activated" handler="OnNewActionActivated" />
</action> </action>
<action id="OpenAction"> <action id="OpenAction">
<property name="Type">Action</property> <property name="Type">Action</property>
<property name="Label" translatable="yes">_Open</property>
<property name="Label" translatable="yes">_Open...</property>
<property name="ShortLabel" translatable="yes">_Open</property> <property name="ShortLabel" translatable="yes">_Open</property>
<property name="StockId">gtk-open</property> <property name="StockId">gtk-open</property>
<signal name="Activated" handler="OnOpenActionActivated" /> <signal name="Activated" handler="OnOpenActionActivated" />
@@ -72,7 +75,7 @@
</action> </action>
<action id="SaveAsAction"> <action id="SaveAsAction">
<property name="Type">Action</property> <property name="Type">Action</property>
<property name="Label" translatable="yes">Save _As</property>
<property name="Label" translatable="yes">Save _As...</property>
<property name="ShortLabel" translatable="yes">Save _As</property> <property name="ShortLabel" translatable="yes">Save _As</property>
<property name="StockId">gtk-save-as</property> <property name="StockId">gtk-save-as</property>
<signal name="Activated" handler="OnSaveAsActionActivated" /> <signal name="Activated" handler="OnSaveAsActionActivated" />
@@ -145,12 +148,14 @@
<property name="Label" translatable="yes" /> <property name="Label" translatable="yes" />
<property name="Sensitive">False</property> <property name="Sensitive">False</property>
<property name="StockId">gtk-undo</property> <property name="StockId">gtk-undo</property>
<property name="Tooltip" translatable="yes">Undo action</property>
</action> </action>
<action id="redoAction"> <action id="redoAction">
<property name="Type">Action</property> <property name="Type">Action</property>
<property name="Label" translatable="yes" /> <property name="Label" translatable="yes" />
<property name="Sensitive">False</property> <property name="Sensitive">False</property>
<property name="StockId">gtk-redo</property> <property name="StockId">gtk-redo</property>
<property name="Tooltip" translatable="yes">Redo action</property>
</action> </action>
<action id="zoom100Action"> <action id="zoom100Action">
<property name="Type">Action</property> <property name="Type">Action</property>
@@ -186,6 +191,7 @@
<property name="Type">Action</property> <property name="Type">Action</property>
<property name="Label" translatable="yes" /> <property name="Label" translatable="yes" />
<property name="StockId">gtk-save-as</property> <property name="StockId">gtk-save-as</property>
<property name="Tooltip" translatable="yes">Save active image </property>
<signal name="Activated" handler="OnSaveAsActionActivated" /> <signal name="Activated" handler="OnSaveAsActionActivated" />
</action> </action>
</action-group> </action-group>
@@ -240,7 +246,6 @@
<node type="Toolitem" action="newAction" /> <node type="Toolitem" action="newAction" />
<node type="Toolitem" action="openAction" /> <node type="Toolitem" action="openAction" />
<node type="Toolitem" action="saveAction" /> <node type="Toolitem" action="saveAction" />
<node type="Toolitem" action="saveAsAction" />
<node type="Separator" /> <node type="Separator" />
<node type="Toolitem" action="undoAction" /> <node type="Toolitem" action="undoAction" />
<node type="Toolitem" action="redoAction" /> <node type="Toolitem" action="redoAction" />
@@ -615,6 +620,7 @@
<child> <child>
<widget class="Gtk.FileChooserWidget" id="filechooserwidget1"> <widget class="Gtk.FileChooserWidget" id="filechooserwidget1">
<property name="MemberName" /> <property name="MemberName" />
<property name="Action">Save</property>
</widget> </widget>
<packing> <packing>
<property name="Position">0</property> <property name="Position">0</property>


Loading…
Cancel
Save