X-Git-Url: http://git.dolda2000.com/gitweb/?a=blobdiff_plain;f=config%2Futil%2Fdolconf.c;h=07c6077999c242962c511bb98db7298d122f324b;hb=c335e21c3b6431328284851ca845d3a9182ed0a3;hp=a63790936a6f1b654e0a44d54fd1fe16ec9ae885;hpb=7df0ddad481bb2e644bba361d0d3defdbd68494e;p=doldaconnect.git diff --git a/config/util/dolconf.c b/config/util/dolconf.c index a637909..07c6077 100644 --- a/config/util/dolconf.c +++ b/config/util/dolconf.c @@ -58,28 +58,10 @@ GtkListStore *shares; int state, dirty = 1; int ignoreclose = 0; -void astcancel(GtkWidget *widget, gpointer uudata); -void astupdate(GtkWidget *widget, GtkWidget *page, gpointer uudata); -void cb_ast_wnd_apply(GtkWidget *widget, gpointer uudata); -void cb_ast_nick_changed(GtkWidget *widget, gpointer uudata); -void cb_ast_shareadd_clicked(GtkWidget *widget, gpointer uudata); -void cb_ast_sharerem_clicked(GtkWidget *widget, gpointer uudata); -void cb_ast_checkports(GtkWidget *widget, gpointer uudata); -void cb_ast_mode_nat_toggled(GtkWidget *widget, gpointer uudata); -void cb_cfw_mode_act_toggled(GtkWidget *widget, gpointer uudata); -void cb_cfw_orport_toggled(GtkWidget *widget, gpointer uudata); -void cb_cfw_oraddr_toggled(GtkWidget *widget, gpointer uudata); -void cb_cfw_uinet_toggled(GtkWidget *widget, gpointer uudata); -void cb_cfw_save_activate(GtkWidget *widget, gpointer uudata); -void cb_cfw_hup_activate(GtkWidget *widget, gpointer uudata); -void cb_cfw_quit_activate(GtkWidget *widget, gpointer uudata); -void cb_cfw_shareadd_clicked(GtkWidget *widget, gpointer uudata); -void cb_cfw_sharerem_clicked(GtkWidget *widget, gpointer uudata); - #define _(text) gettext(text) -#include "dolconf-assistant.gtk" -#include "dolconf-wnd.gtk" +#include "dolconf-assistant.gtkh" +#include "dolconf-wnd.gtkh" int v_nonempty(const char *val) { @@ -657,7 +639,8 @@ void cb_ast_shareadd_clicked(GtkWidget *widget, gpointer uudata) void cb_cfw_shareadd_clicked(GtkWidget *widget, gpointer uudata) { - shareadd(); + if(shareadd()) + dirty = 1; } void cb_ast_sharerem_clicked(GtkWidget *widget, gpointer uudata) @@ -674,8 +657,10 @@ void cb_cfw_sharerem_clicked(GtkWidget *widget, gpointer uudata) { GtkTreeIter iter; - if(gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(cfw_sharelist)), NULL, &iter)) + if(gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(cfw_sharelist)), NULL, &iter)) { gtk_list_store_remove(shares, &iter); + dirty = 1; + } } void cb_ast_checkports(GtkWidget *widget, gpointer uudata) @@ -855,8 +840,8 @@ int main(int argc, char **argv) } else if(state == 2) { for(i = 3; i < FD_SETSIZE; i++) close(i); - execlp("dolcon", "dolcon", NULL); - perror("dolcon"); + execlp("dolcon-launch", "dolcon-launch", NULL); + perror("dolcon-launch"); exit(127); } else { msgbox(GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Internal error (Unknown state)")); @@ -865,3 +850,6 @@ int main(int argc, char **argv) } return(0); } + +#include "dolconf-assistant.gtk" +#include "dolconf-wnd.gtk"