Esempio n. 1
0
void
calendar_goto_today (GnomeCalendar *gcal)
{
	set_clock_cursor (gcal);
	gnome_calendar_goto_today (gcal);
	set_normal_cursor (gcal);
}
Esempio n. 2
0
void CLog::activate_prev_file()
{
  set_clock_cursor();
  if ( !clognav->prev_file())
    wow->DisplayError( "File error", "No previous file found");
  reset_cursor();
}
Esempio n. 3
0
void CLog::activate_next_file()
{
  set_clock_cursor();
  if ( !clognav->next_file())
    wow->DisplayError( "File error", "No next file found");
  reset_cursor();
}
Esempio n. 4
0
static void
cut_cmd (BonoboUIComponent *uic, gpointer data, const gchar *path)
{
	GnomeCalendar *gcal;

	gcal = GNOME_CALENDAR (data);
	set_clock_cursor (gcal);
	gnome_calendar_cut_clipboard (gcal);
	set_normal_cursor (gcal);
}
Esempio n. 5
0
static void
delete_occurrence_cmd (BonoboUIComponent *uic, gpointer data, const gchar *path)
{
	GnomeCalendar *gcal;

	gcal = GNOME_CALENDAR (data);

	set_clock_cursor (gcal);
	gnome_calendar_delete_selected_occurrence (gcal);
	set_normal_cursor (gcal);
}
Esempio n. 6
0
static void
next_clicked (BonoboUIComponent *uic, gpointer data, const char *path)
{
	GnomeCalendar *gcal;

	gcal = GNOME_CALENDAR (data);

	set_clock_cursor (gcal);
	gnome_calendar_next (gcal);
	set_normal_cursor (gcal);
}
Esempio n. 7
0
void WPkg::activate_createpkg()
{
  WItemPkg **itemlist;
  int item_count;
  int sts;

  message( ' ', "");

  sts = wpkgnav->get_select( &itemlist, &item_count);
  if ( EVEN(sts)) {
    message( 'E', "Select a node");
    return;
  }

  for ( int i = 0; i < item_count; i++) {
    if ( typeid( *itemlist[i]) != typeid( WItemPkgNode)) {
      message( 'E', "All selected items are not nodes");
      free( itemlist);
      return;
    }
  }
    
  set_clock_cursor();
  for ( int i = 0; i < item_count; i++) {
    try {
      wb_pkg *pkg = new wb_pkg( ((WItemPkgNode *)itemlist[i])->nodename, false);
      delete pkg;
    }
    catch ( wb_error &e) {
      message(' ', (char *)e.what().c_str());
      reset_cursor();
      free( itemlist);
      return;
    }
    wpkgnav->refresh_node( itemlist[i]);

    char msg[80];
    sprintf( msg, "Package created for node %s", ((WItemPkgNode *)itemlist[i])->nodename);
    message('I', msg);
    flush();
  }
  reset_cursor();
  free( itemlist);
}
Esempio n. 8
0
//
//  Callbackfunctions from menu entries
//
void WPkg::activate_distribute()
{
  WItemPkg **itemlist;
  int item_count;
  int sts;

  message( ' ', "");

  sts = wpkgnav->get_select( &itemlist, &item_count);
  if ( EVEN(sts)) {
    message( 'E', "Select a node or package");
    return;
  }

  if ( item_count > 1) {
    for ( int i = 0; i < item_count; i++) {
      if ( typeid( *itemlist[i]) != typeid( WItemPkgNode)) {
	message( 'E', "All selected items are not nodes");
	free( itemlist);
	return;
      }
    }
    
    set_clock_cursor();
    for ( int i = 0; i < item_count; i++) {
      try {
	wb_pkg *pkg = new wb_pkg( ((WItemPkgNode *)itemlist[i])->nodename);
	delete pkg;
      }
      catch ( wb_error &e) {
	message(' ', (char *)e.what().c_str());
	reset_cursor();
	free( itemlist);
	return;
      }
      wpkgnav->refresh_node( itemlist[i]);

      char msg[80];
      sprintf( msg, "Distribution successful to %s", ((WItemPkgNode *)itemlist[i])->nodename);
      message('I', msg);
      flush();
    }
    reset_cursor();
    free( itemlist);
  }
  else {
    // One is selected
    if ( typeid( *itemlist[0]) == typeid( WItemPkgNode)) {
      set_clock_cursor();
      try {
	wb_pkg *pkg = new wb_pkg( ((WItemPkgNode *)itemlist[0])->nodename);
	delete pkg;
      }
      catch ( wb_error &e) {
	message(' ', (char *)e.what().c_str());
      }
      wpkgnav->refresh_node( itemlist[0]);

      char msg[80];
      sprintf( msg, "Distribution successful to %s", ((WItemPkgNode *)itemlist[0])->nodename);
      message('I', msg);
      reset_cursor();
    }
    else if ( typeid( *itemlist[0]) == typeid( WItemPkgPackage)) {
      set_clock_cursor();
      wb_pkg::copyPackage( ((WItemPkgPackage *)itemlist[0])->packagename);
      char msg[80];
      sprintf( msg, "Distribution successful of %s", ((WItemPkgPackage *)itemlist[0])->packagename);
      message('I', msg);
      reset_cursor();
    }
    else {
      message( 'E', "Select a node or package");
    }
  }
}