Skip to content

Commit

Permalink
add project ui xml
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel.borgmann committed Nov 21, 2008
1 parent c897fe9 commit 0e2271d
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 3 deletions.
10 changes: 10 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
2008-11-21 Daniel Borgmann <[email protected]>

* data/Makefile.am:
* data/glasscat-project-ui.xml:
* data/glasscat-ui.xml:
* glasscat/application.vala:
* glasscat/projectwindow.vala:

Add project placeholder and ui definition.

2008-11-20 Daniel Borgmann <daniel@daniel-laptop>

* glasscat/application.vala:
Expand Down
1 change: 1 addition & 0 deletions data/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ NULL =
uidir = $(pkgdatadir)
ui_DATA = \
glasscat-ui.xml \
glasscat-project-ui.xml \
$(NULL)

if GCONF_SCHEMAS_INSTALL
Expand Down
11 changes: 11 additions & 0 deletions data/glasscat-project-ui.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<ui>
<menubar name="menubar">
<placeholder name="project-placeholder" />
<menu action="project">
</menu>
</placeholder>
<menu action="help">
<menuitem action="about"/>
</menu>
</menubar>
</ui>
1 change: 1 addition & 0 deletions data/glasscat-ui.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
<menu action="document">
<menuitem action="word-wrap"/>
</menu>
<placeholder name="project-placeholder" />
<menu action="help">
<menuitem action="about"/>
</menu>
Expand Down
3 changes: 1 addition & 2 deletions glasscat/application.vala
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,8 @@ public class Application : GLib.Object

win_count = win_count + 1;

string mime_type = g_content_type_guess (uri, null, null);
BaseWindow w;
if (mime_type == "application/x-glasscat-project") {
if (g_content_type_guess (uri, null, null) == "application/x-glasscat-project") {
w = new ProjectWindow (uri);
} else {
w = new DocumentWindow (uri);
Expand Down
2 changes: 1 addition & 1 deletion glasscat/projectwindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class ProjectWindow : BaseWindow
drag_dest_set (this, DestDefaults.ALL, targets, DragAction.COPY);
this.drag_data_received += on_drag_data_received;

set_default_size (1000, 800);
set_default_size (960, 700);

string displayname = Filename.display_basename (Uri.unescape_string (this.uri, ""));
set_title (displayname + " - Glasscat");
Expand Down

0 comments on commit 0e2271d

Please sign in to comment.