Commit a6f441af authored by Jiri (George) Lebl's avatar Jiri (George) Lebl Committed by George Lebl

removed

Sat Oct 02 20:30:23 1999  George Lebl  <jirka@5z.com>

        * hints.[ch],hintsdata.c: removed

        * panel.hints: hints in the format of gnome-hint

        * session.c,panel_global_config.[ch]: remove the startup hint toggle
parent 62e9e4f7
Sat Oct 02 20:30:23 1999 George Lebl <jirka@5z.com>
* hints.[ch],hintsdata.c: removed
* panel.hints: hints in the format of gnome-hint
* session.c,panel_global_config.[ch]: remove the startup hint toggle
Fri Oct 01 19:14:58 1999 George Lebl <jirka@5z.com>
* menu.c,status.[ch],session.c,extern.c: fix all the remaining issues
......
Sat Oct 02 20:30:23 1999 George Lebl <jirka@5z.com>
* hints.[ch],hintsdata.c: removed
* panel.hints: hints in the format of gnome-hint
* session.c,panel_global_config.[ch]: remove the startup hint toggle
Fri Oct 01 19:14:58 1999 George Lebl <jirka@5z.com>
* menu.c,status.[ch],session.c,extern.c: fix all the remaining issues
......
......@@ -115,8 +115,6 @@ base_panel_SOURCES=\
button-widget.h \
panel-util.c \
panel-util.h \
hints.c \
hints.h \
tearoffitem.c \
tearoffitem.h
......@@ -157,7 +155,7 @@ EXTRA_DIST = \
panel.gnorba \
panel.soundlist \
APPLET_WRITING \
hintsdata.c
panel.hints
## Put `exec' in the name because this should be installed by
## `install-exec', not `install-data'.
......@@ -192,4 +190,7 @@ panelgnorba_DATA = panel.gnorba
soundlistdir = $(sysconfdir)/sound/events
soundlist_DATA = panel.soundlist
hintsdir = $(datadir)/gnome/hints
hints_DATA = panel.hints
$(srcdir)/panel-util.c: $(CORBA_SRCLIST)
#include "config.h"
#include <gnome.h>
#include <stdlib.h>
#include <time.h>
#include "panel-include.h"
extern GlobalConfig global_config;
extern int globals_to_sync;
static char * hints[] = {
#include "hintsdata.c"
NULL
};
#define NUM_HINTS ((sizeof(hints)/sizeof(char *))-1)
static int current_hint = -1;
static GtkWidget *box = NULL;
static GtkWidget *label = NULL;
static GtkWidget *show_next = NULL;
/*if random is set, then random hint is taken, otherwise,
the next one is taken*/
static void
set_hint(int is_first, int random)
{
g_assert(label);
if(is_first) {
current_hint = 0;
} else if(!random) {
current_hint++;
if(current_hint>=NUM_HINTS)
current_hint = 0;
} else {
srand(time(NULL));
current_hint = (1000*rand())%NUM_HINTS;
}
gtk_label_set(GTK_LABEL(label),gettext(hints[current_hint]));
}
static void
clicked(GtkWidget *w, int button_num, gpointer data)
{
if(button_num == 0)
set_hint(FALSE,FALSE);
else
gtk_widget_destroy(box);
}
static void
on_destroy(GtkWidget *w, gpointer data)
{
box = NULL;
if(global_config.show_startup_hints !=
GTK_TOGGLE_BUTTON(show_next)->active) {
global_config.show_startup_hints =
GTK_TOGGLE_BUTTON(show_next)->active;
globals_to_sync = TRUE;
panel_config_sync();
}
}
void
show_hint(int is_first)
{
GtkWidget *hbox, *w;
if(box) {
gtk_widget_show_now(box);
gdk_window_raise(box->window);
set_hint(is_first,TRUE);
}
box = gnome_dialog_new(_("Panel hint"),
_("Show another hint"),
GNOME_STOCK_BUTTON_CLOSE,
NULL);
gtk_signal_connect(GTK_OBJECT(box),"destroy",
GTK_SIGNAL_FUNC(on_destroy), NULL);
gtk_signal_connect(GTK_OBJECT(box),"clicked",
GTK_SIGNAL_FUNC(clicked),NULL);
w = gtk_frame_new(NULL);
gtk_frame_set_shadow_type(GTK_FRAME(w),GTK_SHADOW_IN);
gtk_box_pack_start(GTK_BOX(GNOME_DIALOG(box)->vbox),w,TRUE,TRUE,0);
hbox = gtk_hbox_new(FALSE,GNOME_PAD_SMALL);
gtk_container_set_border_width(GTK_CONTAINER(hbox),20);
gtk_container_add(GTK_CONTAINER(w),hbox);
label = gtk_label_new("");
gtk_box_pack_start(GTK_BOX(hbox),label,TRUE,TRUE,0);
show_next = gtk_check_button_new_with_label(_("Show this dialog on startup"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (show_next),
global_config.show_startup_hints);
gtk_box_pack_start(GTK_BOX(GNOME_DIALOG(box)->vbox),show_next,FALSE,FALSE,0);
set_hint(is_first,TRUE);
gtk_widget_show_all(box);
}
#ifndef HINTS_H
#define HINTS_H
BEGIN_GNOME_DECLS
/*is_first indicates if this is the first time we are running*/
void show_hint(int is_first);
END_GNOME_DECLS
#endif
/* This file is to be #included, so it's not a real .c file*/
/* The first hint is the one shown on first login */
N_("Click on the foot in the lower left hand\n"
"corner to start working with GNOME"),
N_("Right click on the panel to get a menu"),
N_("To add an applet, right click on a panel\n"
"then choose 'Add to panel', then 'Applet',\n"
"then pick an applet from the list"),
N_("To manipulate a panel applet, right click\n"
"anywhere over the applet"),
N_("To move a panel applet, click the middle\n"
"button of your mouse over it. You can also\n"
"right click on it and choose 'Move applet'"),
N_("You can drag applets from the applet\n"
"adding menu onto the panel"),
N_("You can drag icons from the Programs menu\n"
"onto the desktop or onto the panel to\n"
"make new icons"),
N_("You can get some choices about an item\n"
"in the Programs menu, by right clicking\n"
"on the item in the menu"),
......@@ -280,9 +280,6 @@ main(int argc, char **argv)
/* we will select the events later when we actually need them */
gdk_window_add_filter(GDK_ROOT_PARENT(), event_filter, NULL);
if(global_config.show_startup_hints)
show_hint(is_first);
/* I use the glue code to avoid making this a C++ file */
gtk_main ();
......
......@@ -30,7 +30,6 @@ struct _GlobalConfig {
int tile_depth[LAST_TILE];
int hide_panel_frame;
int tile_when_over;
int show_startup_hints;
};
void panel_config_global(void);
......
......@@ -36,6 +36,4 @@
#include "panel-util.h"
#include "hints.h"
#endif
<?xml version="1.0"?>
<GnomeHints xmlns="http://www.gnome.org/gnome-hints">
<Hint>
<Content>Click on the foot in the lower left hand
corner to start working with GNOME</Content>
</Hint>
<Hint>
<Content>Right click on the panel to get a menu</Content>
</Hint>
<Hint>
<Content>To add an applet, right click on a panel
then choose 'Applets', then pick an applet
from the list</Content>
</Hint>
<Hint>
<Content>To manipulate a panel applet, right click
anywhere over the applet</Content>
<Content xml:lang="cs">Manipulaci s aplety je mo¾no dosáhnout
pravým tlaèítkem my¹i</Content>
</Hint>
<Hint>
<Content>To move a panel applet, click the middle
button of your mouse over it. You can also
right click on it and choose 'Move applet'</Content>
</Hint>
<Hint>
<Content>You can drag applets from the
'Applets' menu onto the panel</Content>
</Hint>
<Hint>
<Content>You can drag icons from the 'Programs'
panel menu onto the desktop or onto the
panel to make new icons</Content>
</Hint>
<Hint>
<Content>You can get some choices about an item
in the 'Programs' menu, by right clicking
on the item in the menu</Content>
</Hint>
</GnomeHints>
......@@ -611,15 +611,6 @@ misc_notebook_page(void)
&(temp_config.tooltips_enabled));
gtk_box_pack_start (GTK_BOX (box), button, FALSE, FALSE, 0);
/* only show tiles when mouse is over the button */
button = gtk_check_button_new_with_label (_("Show hints on panel startup"));
if (temp_config.show_startup_hints)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (set_toggle_button_value),
&(temp_config.show_startup_hints));
gtk_box_pack_start (GTK_BOX (box), button, FALSE, FALSE, 0);
/* Drawer/launcher auto close */
button = gtk_check_button_new_with_label (_("Close drawer if a launcher inside it is pressed"));
if (temp_config.drawer_auto_close)
......
......@@ -30,7 +30,6 @@ struct _GlobalConfig {
int tile_depth[LAST_TILE];
int hide_panel_frame;
int tile_when_over;
int show_startup_hints;
};
void panel_config_global(void);
......
......@@ -585,8 +585,6 @@ do_session_save(GnomeClient *client,
global_config.hide_panel_frame);
gnome_config_set_bool("tile_when_over",
global_config.tile_when_over);
gnome_config_set_bool("show_startup_hints",
global_config.show_startup_hints);
buf = g_string_new(NULL);
for(i=0;i<LAST_TILE;i++) {
g_string_sprintf(buf,"tiles_enabled_%d",i);
......@@ -1185,7 +1183,6 @@ load_up_globals(void)
global_config.simple_movement = gnome_config_get_bool("simple_movement=FALSE");
global_config.hide_panel_frame = gnome_config_get_bool("hide_panel_frame=FALSE");
global_config.tile_when_over = gnome_config_get_bool("tile_when_over=FALSE");
global_config.show_startup_hints = gnome_config_get_bool("show_startup_hints=TRUE");
for(i=0;i<LAST_TILE;i++) {
g_string_sprintf(buf,"tiles_enabled_%d=TRUE",i);
global_config.tiles_enabled[i] =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment