gitkLauncher.c File Reference

simple application laucher. More...

#include "config.h"
#include <glib.h>
#include <stdio.h>
#include <libgitk/gitk.h>

Include dependency graph for gitkLauncher.c:

Include dependency graph

Go to the source code of this file.

Functions

gboolean global_on_close (gpointer dialog, gchar *widget_id, GitkEventPtr event, gpointer user_data)
 handle global close events like pressing ctrl-c or closing the dialog window

gboolean global_on_dialog_hide (gpointer dialog, gchar *widget_id, GitkEventPtr event, gpointer user_data)
 gets invoked before a dialog will lose the focus

gboolean global_on_dialog_show (gpointer dialog, gchar *widget_id, GitkEventPtr event, gpointer user_data)
 gets invoked after a dialog has received the focus

int main (int argc, char **argv)
 example main routine

gboolean main_on_changed (gpointer dialog, gchar *widget_id, GitkEventPtr event, gpointer user_data)
 gets invoked when a widgets value has been changed

gboolean main_on_clicked (gpointer dialog, gchar *widget_id, GitkEventPtr event, gpointer user_data)
 gets invoked when a action widget has been invoked

gboolean main_show (char *root)
 build and show launcher dialog

gchar * strapp (gchar *src1, gchar *src2)
 append a string to another


Variables

gint menu_choice
 the choosen menu entry to lauch

gboolean ret = TRUE
 application termination status


Detailed Description

simple application laucher.

Id
gitkLauncher.c,v 1.20 2004/06/30 16:53:01 ensonic Exp

Author:
Stefan Kost <ensonic@users.sf.net>
Date:
Thu Jul 17 12:48:27 2003

Reads menu def from xml file and then offers the list of applications to the user.

Definition in file gitkLauncher.c.


Function Documentation

gboolean global_on_close gpointer  dialog,
gchar *  widget_id,
GitkEventPtr  event,
gpointer  user_data
 

handle global close events like pressing ctrl-c or closing the dialog window

Todo:
we should add a dialog here asking "Are you sure ?"

Definition at line 59 of file gitkLauncher.c.

References gitk_log, GitkEventPtr, and ret.

gboolean global_on_dialog_hide gpointer  dialog,
gchar *  widget_id,
GitkEventPtr  event,
gpointer  user_data
 

gets invoked before a dialog will lose the focus

Definition at line 74 of file gitkLauncher.c.

References gitk_log, and GitkEventPtr.

gboolean global_on_dialog_show gpointer  dialog,
gchar *  widget_id,
GitkEventPtr  event,
gpointer  user_data
 

gets invoked after a dialog has received the focus

Definition at line 67 of file gitkLauncher.c.

References gitk_log, and GitkEventPtr.

int main int  argc,
char **  argv
 

example main routine

Todo:
obtain renderer info from libgitk, so that we can pass this when starting new apps

exec the program associated with <menu_choice> using system() (which waits for the programm to finish)

Definition at line 175 of file gitkLauncher.c.

References _, bindtextdomain, gitk_done(), gitk_init(), gitk_log, gitk_log1, gitk_log2, gitk_log3, gitk_log_handler(), gitk_printf(), gitk_puts(), main_show(), menu_choice, ret, and textdomain.

Here is the call graph for this function:

gboolean main_on_changed gpointer  dialog,
gchar *  widget_id,
GitkEventPtr  event,
gpointer  user_data
 

gets invoked when a widgets value has been changed

Definition at line 95 of file gitkLauncher.c.

References gitk_log2, gitk_save_get_string, and GitkEventPtr.

gboolean main_on_clicked gpointer  dialog,
gchar *  widget_id,
GitkEventPtr  event,
gpointer  user_data
 

gets invoked when a action widget has been invoked

Definition at line 83 of file gitkLauncher.c.

References gitk_event_loop_end(), gitk_log1, GitkEventPtr, and ret.

Here is the call graph for this function:

gboolean main_show char *  root  ) 
 

build and show launcher dialog

Todo:
read launcher config and build xml-dialog (see gitk-renderer-text/gitkrenderer.c/gitkr_select_context()

Definition at line 108 of file gitkLauncher.c.

References _, gitk_dialog_free(), gitk_dialog_hide(), gitk_dialog_new_from_string(), gitk_dialog_show(), gitk_event_loop_start(), GITK_EVENT_TYPE_ON_CHANGED, GITK_EVENT_TYPE_ON_CLICKED, GITK_EVENT_TYPE_ON_CLOSE, gitk_get_error_code(), gitk_get_error_str(), gitk_log, GITK_NS_URL, gitk_printf(), global_on_close(), I18N_NS_URL, main_on_changed(), main_on_clicked(), menu_choice, and strapp().

Here is the call graph for this function:

gchar* strapp gchar *  src1,
gchar *  src2
 

append a string to another

Definition at line 38 of file gitkLauncher.c.

References ret.

Referenced by gitkr_select_context(), and main_show().


Variable Documentation

gint menu_choice
 

the choosen menu entry to lauch

Definition at line 26 of file gitkLauncher.c.

Referenced by main(), and main_show().

gboolean ret = TRUE
 

application termination status

Definition at line 28 of file gitkLauncher.c.


Generated on Thu Oct 28 10:59:38 2004 for gitk by doxygen 1.3.6