Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=grape.git;a=commitdiff;h=18184d6ccc0c4c565662ed0fbb100684e38381b4

commit 18184d6ccc0c4c565662ed0fbb100684e38381b4
Author: James Buren <r...@frugalware.org>
Date:   Sun Apr 4 05:13:02 2010 -0500

main.c/new_action.c/window_new.c
* add hook for opening a new window with no file preloaded

diff --git a/src/main.c b/src/main.c
index 573665b..1e75853 100644
--- a/src/main.c
+++ b/src/main.c
@@ -21,13 +21,10 @@
#include "exports.h"

gint main(gint argc,gchar **argv) {
-  SharedInfo *info;

gtk_init(&argc,&argv);

-  info = window_new(NULL);
-
-  gtk_widget_show_all(GTK_WIDGET(info->parent));
+  window_new(NULL);

gtk_main();

diff --git a/src/new_action.c b/src/new_action.c
index 439184e..8067cb7 100644
--- a/src/new_action.c
+++ b/src/new_action.c
@@ -20,5 +20,6 @@

#include "exports.h"

-void new_action(GtkToolButton *btn,SharedInfo *info) {
+void new_action(GtkToolButton *button,SharedInfo *info) {
+  window_new(NULL);
}
diff --git a/src/window_new.c b/src/window_new.c
index 91cfda0..fdcb5d6 100644
--- a/src/window_new.c
+++ b/src/window_new.c
@@ -46,5 +46,7 @@ SharedInfo *window_new(const gchar *filename) {

g_signal_connect(info->parent,"map-event",G_CALLBACK(load_action),info);

+  gtk_widget_show_all(GTK_WIDGET(info->parent));
+
return info;
}
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to